AFFiNE/packages/frontend/graphql/codegen.yml
2023-10-18 15:30:08 +00:00

33 lines
680 B
YAML

hooks:
afterOneFileWrite:
- prettier --write
config:
strict: true
maybeValue: T | null
declarationKind: interface
avoidOptionals: true
preResolveTypes: true
onlyOperationTypes: true
namingConvention:
enumValues: keep
scalars:
DateTime: string
Date: string
Decimal: number
UUID: string
ID: string
JSON: any
Upload: File
overwrite: true
schema: ../../backend/server/src/schema.gql
documents: ./src/**/*.gql
generates:
./src/schema.ts:
plugins:
- typescript
- typescript-operations
- add:
content: '/* eslint-disable */'
- ./export-gql-plugin.cjs:
output: ./src/graphql/index.ts