codegen.yaml

 1schema: '../graphql/schema/*.graphql'
 2overwrite: true
 3documents: src/**/*.graphql
 4generates:
 5  ./src/fragmentTypes.js:
 6    plugins:
 7    - fragment-matcher
 8    config:
 9      module: es2015
10  ./src/gqlTypes.ts:
11    plugins:
12    - typescript
13  ./src/schema.json:
14    plugins:
15    - introspection
16  ./src/:
17    plugins:
18    - add: '/* eslint-disable @typescript-eslint/no-unused-vars, import/order */'
19    - typescript-operations
20    - typescript-react-apollo
21    preset: near-operation-file
22    presetConfig:
23      extension: .generated.tsx
24      baseTypesPath: gqlTypes.ts
25    config:
26      withComponent: false
27      withHOC: false
28      withHooks: true
29
30hooks:
31  afterAllFileWrite:
32  - prettier --write