-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.graphqlrc.yml
34 lines (32 loc) · 1.24 KB
/
.graphqlrc.yml
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
31
32
33
34
schema: schema.graphql
extensions:
codegen:
config:
constEnums: true # use `const enum` to define unions
declarationKind: interface # use `interface` keyword to define types
dedupeOperationSuffix: true # prevent `MyQueryQuery`
documentVariableSuffix: '' # export `MyQuery` instead of `MyQueryDocument`
immutableTypes: true # add `readonly` keyword to frozen objects
namingConvention: keep # don't rename types
operationResultSuffix: Data # add `Data` suffix to result types
optionalResolveType: true # make `__resolveType` field optional
useIndexSignature: true # required for compatibility with apollo server
generates:
src/schema.ts:
schema: src/client.schema.graphql
plugins:
- typescript-operations
src/:
schema: src/client.schema.graphql
preset: near-operation-file
presetConfig:
baseTypesPath: schema.ts
extension: .graphql.ts
plugins:
- typescript-operations
- typed-document-node
documents:
- src/**/*.fragment.graphql
- src/**/*.mutation.graphql
- src/**/*.query.graphql
- src/**/*.subscription.graphql