Skip to content

Instantly share code, notes, and snippets.

@hernanif1
Created September 11, 2020 13:33
Show Gist options
  • Save hernanif1/30b8d279d130e435a0a8f842bc0cd1c2 to your computer and use it in GitHub Desktop.
Save hernanif1/30b8d279d130e435a0a8f842bc0cd1c2 to your computer and use it in GitHub Desktop.
overwrite: true
schema:
- https://YOUR-API/v1/graphql:
headers:
Authorization: "${TOKEN_API}"
documents: src/**/*.gql
generates:
./src/services/index.tsx:
plugins:
- typescript
- typescript-operations
- typescript-react-apollo
- add:
content: "// File auto-generated by codegen.yml (npm run codegen)"
- add:
content: "/* eslint-disable */"
config:
namingConvention:
enumValues: upper-case#upperCase
dedupeOperationSuffix: true
withResultType: false
withComponent: false
withHOC: false
withHooks: true
withMutationFn: false
preResolveTypes: true
maybeValue: T | null | undefined
scalars:
Boolean: boolean
Long: number
Identity: string
UUID: string
ZonedDateTime: Date
longValue: number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment