This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
GraphQLEnumType, | |
GraphQLObjectType, | |
GraphQLFloat, | |
GraphQLID, | |
GraphQLNonNull, | |
GraphQLString, | |
} = require('graphql'); | |
const { | |
globalIdField, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = generateTemplateString("Xin chào ${map.name}, tuổi con ${age}."); | |
console.log(template({ | |
name: 'None use', | |
age: 'chó', | |
map: { | |
name: 'Trần Minh Giàu', | |
} | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version":"2008-10-17", | |
"Id":"http referer policy example", | |
"Statement":[ | |
{ | |
"Sid":"Allow get requests referred by www.mysite.com and mysite.com", | |
"Effect":"Allow", | |
"Principal":"*", | |
"Action":"s3:GetObject", | |
"Resource":"arn:aws:s3:::YOUR_S3_BUCKET_NAME/*", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require('request-promise'); | |
const errors = require('feathers-errors'); | |
const options = { | |
idField: 'sub', | |
issuer: 'iss' | |
}; | |
module.exports = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const DataLoader = require('dataloader'); | |
class Service { | |
constructor({ BaseService, options }) { | |
this.id = BaseService.id || 'id'; | |
this.service = BaseService; | |
this.dataloader = new DataLoader(this._batchGet.bind(this), options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const UnauthNavigator = StackNavigator({ | |
Splash: { | |
screen: SplashScreen, | |
navigationOptions: { | |
header: null, | |
}, | |
}, | |
SignIn: { | |
screen: SignInScreen, | |
navigationOptions: (props) => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
const defaultDiacriticsRemovalMap = [{ | |
'base': 'A', | |
'letters': '\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F' | |
}, { | |
'base': 'AA', | |
'letters': '\uA732' | |
}, { | |
'base': 'AE', | |
'letters': '\u00C6\u01FC\u01E2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class SpecAsync { | |
async isSatisfiedBy(obj) { | |
return Promise.reject('isSatisfiedBy not implemented'); | |
} | |
and(spec) { | |
return new AndSpecAsync(this, spec); | |
} | |
or(spec) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {View, Text, Navigator, StatusBar} from 'react-native'; | |
import SideMenu from './Router.js' | |
import Authentication from './Authentication/Authentication.js'; | |
import Main from './Main/Main.js'; | |
import ChangeInfo from './ChangeInfo/ChangeInfo.js'; | |
import OrderHistory from './OrderHistory/OrderHistory.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
defaultFieldResolver, | |
DirectiveNode, | |
GraphQLField, | |
GraphQLFieldResolver, | |
GraphQLResolveInfo, | |
GraphQLSchema, | |
} from 'graphql'; | |
import { forEachField } from 'graphql-tools'; | |
import { getArgumentValues } from 'graphql/execution/values'; |