- Opening Keynote: Matt DeBergalis, Co-Founder, CTO at Apollo
- Migrating to Apollo at Airbnb: Brie Bunge , Airbnb
- The GraphQL Developer Experience: Danielle Man, Apollo
- State Management in GraphQL using React Hooks & Apollo: Shruti Kapoor, PayPal
- Fine-Tuning Apollo Client Caching for Your Data Graph: Ben Newman, Apollo
- Scaling GraphQL Beyond a Backend for Frontend: Michelle Garrett, Condé Nast International
This file contains 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
module.exports = { | |
// ... other configurations ... | |
plugins: [ | |
'custom', // Assuming 'custom' is the name of your plugin | |
], | |
rules: { | |
'custom/pascal-case-component': 'warn', | |
}, | |
}; |
This file contains 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 { useField } from 'formik' | |
import React from 'react' | |
import StringMask from 'string-mask' | |
import TextField from '@material-ui/core/TextField' | |
const DELIMITER = '-' | |
const MASK = '000-000-0000' | |
function removeTrailingCharIfFound(str: string, char): string { | |
return str |
This file contains 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
Warning: member-ordering - Direct string option is deprecated and does not support accessors. | |
See also https://palantir.github.io/tslint/rules/member-ordering/ | |
You should replace "variables-before-functions" | |
with the following equivalent options and add -accessor categories as appropriate: | |
[ | |
{ | |
"name": "field", | |
"kinds": [ | |
"public-static-field", | |
"protected-static-field", |
This file contains 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 { useRef } from 'react' | |
const usePrevious = value => { | |
const ref = useRef() | |
useEffect(() => { | |
ref.current = value | |
}) | |
return ref.current | |
} |
This file contains 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
/** | |
* | |
* AccountHolder Default Values | |
*/ | |
import find from 'lodash.find' | |
import get from 'lodash.get' | |
import { | |
AccountHolderMutationVariables, AccountTypeEnum, GetAccountHolderQuery, GetPersonQuery | |
} from '@types-generated' |
This file contains 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
Class static side 'typeof MyApp' incorrectly extends base class static side 'typeof App'. | |
Types of property 'getInitialProps' are incompatible. | |
Type '({ Component, ctx }: any) => Promise<{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; } | { ...; }>' is not assignable to type '(context: NextAppContext<Record<string, string | string[] | undefined>, {}>) => Promise<DefaultAppIProps>'. | |
Type 'Promise<{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; messages: any; initialNow: number; pageProps?: undefined; } | { ...; }>' is not assignable to type 'Promise<DefaultAppIProps>'. | |
Type '{ pageProps: {}; locale?: undefined; messages?: undefined; initialNow?: undefined; } | { query: any; authtoken: string; isLoggedIn: boolean; locale: any; |
This file contains 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
/* | |
* Author: @carlosagsmendes | |
* Source: https://github.com/jquense/yup/issues/345#issuecomment-487320558 | |
*/ | |
import yup from 'yup'; | |
yup.addMethod(yup.array, 'unique', function (message, mapper = a => a) { | |
return this.test('unique', message, function (list) { | |
return list.length === new Set(list.map(mapper)).size; |
This file contains 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
// Setup nested array | |
var array1 = [[1,2,[3]],4]; | |
// Iterate over the nested array and reduce/concat | |
function flattenArray(arr1) { | |
return arr1.reduce((acc, val) => Array.isArray(val) ? acc.concat(flattenArray(val)) : acc.concat(val), []); | |
} | |
// Run the nested array through our function | |
flattenArray(array1); |
NewerOlder