Repository navigation
Expand file tree
/
Copy pathcodegen.yml
More file actions
51 lines (51 loc) · 1.5 KB
/
Copy pathcodegen.yml
File metadata and controls
51 lines (51 loc) · 1.5 KB
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
overwrite: true
# The schema is fetched from a running server by default: CODEGEN_SCHEMA is set
# in the committed .env (http://localhost:3000/graphql) and `pnpm codegen` loads
# .env/.env.local via dotenv-flow. To work offline, point it at a local SDL
# snapshot from .env.local (e.g. CODEGEN_SCHEMA=./schema.graphql) — that file is
# gitignored and must never be committed.
schema: '${CODEGEN_SCHEMA:http://localhost:3000/graphql}'
documents:
- 'src/**/*.graphql'
hooks:
afterAllFileWrite:
- biome check --fix --unsafe
- biome format --write
generates:
src/core/apollo/generated/graphql-schema.ts:
plugins:
- typescript
- typescript-operations
config:
maybeValue: T | undefined
preResolveTypes: true
scalars:
Upload: File
TextID: string
NameID: string
Emoji: string
UUID: string
DID: string
CID: string
DateTime: Date
JSON: string
Markdown: string
MessageID: string
LifecycleDefinition: string
MemoContent: string
WhiteboardContent: string
SearchCursor: string
strictScalars: true
src/core/apollo/generated/apollo-hooks.ts:
preset: import-types
presetConfig:
typesPath: ./graphql-schema
importTypesNamespace: SchemaTypes
plugins:
- typescript-react-apollo
config:
withHooks: true
withRefetchFn: true
src/core/apollo/generated/apollo-helpers.ts:
plugins:
- typescript-apollo-client-helpers