-
Notifications
You must be signed in to change notification settings - Fork 12
/
.graphqlrc.yml
75 lines (65 loc) · 2.41 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
schema: apps/server/src/interfaces/graphql/**/*.graphql
documents: apps/web/src/**/*.graphql
extensions:
diff:
baseSchema: git:origin/master:apps/server/schema.generated.graphql
codegen:
hooks:
afterAllFileWrite:
- prettier --write
overwrite: true
generates:
apps/fake-server/src/schema.generated.json:
plugins:
- introspection
apps/server/schema.generated.graphql:
plugins:
- schema-ast
config:
includeDirectives: true
apps/server/src/types/resolvers.generated.ts:
plugins:
- typescript
- typescript-resolvers
config:
contextType: "~/interfaces/graphql/context#Context"
fieldContextTypes:
- Mutation.updateProfile#~/interfaces/graphql/context#AuthenticatedContext
- Mutation.borrowBookCopy#~/interfaces/graphql/context#AuthenticatedContext
- Mutation.returnBookCopy#~/interfaces/graphql/context#AuthenticatedContext
- Mutation.addBookToFavourites#~/interfaces/graphql/context#AuthenticatedContext
- Mutation.removeBookFromFavourites#~/interfaces/graphql/context#AuthenticatedContext
- Mutation.createReview#~/interfaces/graphql/context#AuthenticatedContext
mappers:
Author: "~/infra/database/entity#Author"
Avatar: "~/infra/database/entity#Avatar"
Book: "~/infra/database/entity#Book"
BookCopy: "~/infra/database/entity#BookCopy"
PublicUser: "~/infra/database/entity#User"
ProtectedUser: "~/infra/database/entity#User"
Review: "~/infra/database/entity#Review"
mapperTypeSuffix: Entity
optionalResolveType: true
scalars:
ExternalID: string
ISODateString: string
showUnusedMappers: true
noSchemaStitching: true
immutableTypes: true
apps/web/src:
plugins:
- typescript-operations
- typescript-react-apollo
config:
gqlImport: "@apollo/client#gql"
avoidOptionals: true
preset: near-operation-file-preset
presetConfig:
baseTypesPath: types.generated.ts
extension: .generated.tsx
apps/web/src/introspectionResult.generated.ts:
plugins:
- fragment-matcher
apps/web/src/types.generated.ts:
plugins:
- typescript