-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodegen-old.yaml
30 lines (30 loc) · 896 Bytes
/
codegen-old.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
overwrite: true
hooks:
afterAllFileWrite:
- prettier --write
schema:
- ./src/graphql/schema.graphql
generates:
./src/dao/types.ts:
plugins:
- typescript
- typescript-mongodb
config:
skipTypename: true
./src/graphql/types.tsx:
documents: # Provide list of files that needs to be checked for queries
- ./pages/**/*.ts*
- ./components/**/*.ts*
plugins:
- typescript
- typescript-resolvers
- typescript-operations
- typescript-react-apollo
config:
withHooks: true # We will be using React Hooks so we disable React Components
withHOC: false
withComponent: false
skipTypename: true
# We need to override the Apollo imports since the generator uses older @apollo/react-hooks package
apolloReactCommonImportFrom: "@apollo/client"
apolloReactHooksImportFrom: "@apollo/client"