Skip to content

Instantly share code, notes, and snippets.

@ForbesLindesay
Created August 20, 2019 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ForbesLindesay/1f70889b65a1f7521ff9270d8d970beb to your computer and use it in GitHub Desktop.
Save ForbesLindesay/1f70889b65a1f7521ff9270d8d970beb to your computer and use it in GitHub Desktop.
# Config for graphql-code-generator
schema: ./schema.graphql
overwrite: true
generates:
./__generated__/types.ts:
plugins:
- add: '/* tslint:disable */'
- add: '// This file was automatically generated and should not be edited.'
- add: import ResolverContext from '../ResolverContext';
- add: import * as Scalars from '../scalars';
- typescript-common
- typescript-server
- typescript-resolvers
config:
contextType: ResolverContext
scalars:
GooglePerson: Scalars.GooglePerson
TrimmedString: string
enums:
AccountType: ../scalars#AccountType
mappers:
Account: ../types#Account
Contact: ../types#Contact
./__generated__/schema.ts:
plugins:
- add: '/* tslint:disable */'
- add: '// This file was automatically generated and should not be edited.'
- add: "import {gql} from 'apollo-server-koa';"
- add: 'export default gql`'
- schema-ast
- add: '`;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment