webapp/codegen.yml
2023-11-28 16:18:25 +03:00

54 lines
1.4 KiB
YAML

overwrite: true
generates:
# Generate types for chat
src/graphql/schema/chat.gen.ts:
schema: 'https://chat.discours.io'
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-urql'
config:
skipTypename: true
useTypeImports: true
outputPath: './src/graphql/types/chat.gen.ts'
# Generate types for core
src/graphql/schema/core.gen.ts:
schema: 'https://testapi.discours.io'
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-urql'
config:
skipTypename: true
useTypeImports: true
outputPath: './src/graphql/types/core.gen.ts'
# Generate types for notifier
src/graphql/schema/notifier.gen.ts:
schema: 'http://notifier.discours.io' # FIXME: https
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-urql'
config:
skipTypename: true
useTypeImports: true
outputPath: './src/graphql/types/notifier.gen.ts'
# Generate types for auth
src/graphql/schema/auth.gen.ts:
schema: 'https://auth.discours.io/graphql'
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-urql'
config:
skipTypename: true
useTypeImports: true
outputPath: './src/graphql/types/auth.gen.ts'
hooks:
afterAllFileWrite:
- prettier --ignore-path .gitignore --write --plugin-search-dir=. src/graphql/schema/*.gen.ts