-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodegen.yml
More file actions
40 lines (34 loc) · 969 Bytes
/
codegen.yml
File metadata and controls
40 lines (34 loc) · 969 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
30
31
32
33
34
35
36
37
38
39
40
# GraphQL Code Generator Configuration
# Generates TypeScript types and typed GraphQL client from Hygraph schema
schema: ${NEXT_PUBLIC_HYGRAPH_CONTENT_ENDPOINT}
documents: 'src/graphql/**/*.gql'
generates:
# Generated types and operations
src/types/hygraph-generated.ts:
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
config:
# Strict type safety
avoidOptionals: false
maybeValue: T | null
strictScalars: true
# Make generated client use our custom client
rawRequest: false
# Output formatting
enumsAsTypes: true
skipTypename: false
# Naming conventions
typesPrefix: ''
typesSuffix: ''
# Scalars (Hygraph custom types)
scalars:
DateTime: string
Date: string
Hex: string
Json: string
Long: number
RGBAHue: number
RGBATransparency: number
RichTextAST: string