-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodegen.yml
More file actions
26 lines (24 loc) · 770 Bytes
/
Copy pathcodegen.yml
File metadata and controls
26 lines (24 loc) · 770 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
# reference https://blog.logrocket.com/build-graphql-react-app-typescript/
# https://www.the-guild.dev/blog/graphql-codegen-best-practices
# https://danilowoz.com/blog/generating-typescript-types-and-react-hooks-based-on-graphql-endpoint
overwrite: true
schema: "https://graphql.anilist.co/graphql"
# documents: "src/**/*.graphql"
generates:
src/graphql/types.ts:
plugins:
- "typescript"
# src/graphql/generated/operations.ts:
# preset: import-types
# presetConfig:
# typesPath: ./types
# plugins:
# - "typescript-operations"
# src/graphql/generated/hooks.ts:
# preset: import-types
# presetConfig:
# typesPath: ./operations
# plugins:
# - "typescript-react-apollo"
# config:
# withHooks: true