-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.yml
More file actions
29 lines (29 loc) · 806 Bytes
/
codegen.yml
File metadata and controls
29 lines (29 loc) · 806 Bytes
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
overwrite: true
schema: ${NEXT_PUBLIC_API_URL}
documents: "src/graphql/**/*.graphql"
generates:
src/generated/graphql.tsx:
plugins:
- add:
content: "export type DateInterval = { startTime: Date, endTime: Date }"
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
config:
withRefetchFn: true
strictScalars: true
scalars:
DateInterval: DateInterval
Timestamp: number
Upload: File
src/generated/page.tsx:
config:
reactApolloVersion: 3
documentMode: external
importDocumentNodeExternallyFrom: "./graphql"
apolloClientInstanceImport: "../pages/_app"
preset: import-types
presetConfig:
typesPath: "./graphql"
plugins:
- "graphql-codegen-apollo-next-ssr"