thunderhub/codegen.yml
2021-12-07 22:16:40 -05:00

29 lines
687 B
YAML

overwrite: true
schema: 'http://localhost:3000/graphql'
documents: 'src/client/src/graphql/**/*.ts'
hooks:
afterAllFileWrite:
- prettier --write
- eslint --fix
generates:
src/client/src/graphql/fragmentTypes.json:
plugins:
- fragment-matcher
src/client/src/graphql/types.ts:
plugins:
- typescript
src/client/src/graphql/:
preset: near-operation-file
presetConfig:
baseTypesPath: types.ts
extension: .generated.tsx
folder: __generated__
config:
withComponent: false
withHOC: false
withHooks: true
reactApolloVersion: 3
plugins:
- 'typescript-operations'
- 'typescript-react-apollo'