Skip to content

Instantly share code, notes, and snippets.

@seandearnaley
Last active April 3, 2020 02:31
Show Gist options
  • Save seandearnaley/448315260acd57851fb6d7632e834333 to your computer and use it in GitHub Desktop.
Save seandearnaley/448315260acd57851fb6d7632e834333 to your computer and use it in GitHub Desktop.
codegen.yml
overwrite: true
schema: "http://localhost:4000/graphql"
documents: src/**/*.graphql
generates:
src/generated/graphql.ts:
hooks:
afterOneFileWrite:
- prettier --write
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
src/generated/fragments.js:
hooks:
afterOneFileWrite:
- prettier --write
plugins:
- "fragment-matcher"
./graphql.schema.json:
plugins:
- "introspection"
config:
apolloClientVersion: 3
withHooks: true
withHOC: false
withComponent: false
gqlImport: "@apollo/client#gql"
apolloReactCommonImportFrom: "@apollo/client"
apolloReactComponentsImportFrom: "@apollo/client"
apolloReactHocImportFrom: "@apollo/client"
apolloReactHooksImportFrom: "@apollo/client"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment