git-bug/webui/codegen.yaml
Quentin Gliech f4433d80c4
webui: dependencies upgrades
Most upgrades are minor version without breaking changes.

One big upgrade is Apollo 2 -> 3, which required a few changes in the
Apollo setup (see src/apollo.ts).

Other changes are due to changes in Prettier, requiring to add
parenthesis around arrow function parameters.

Because of an incompatibility in older version of typescript-eslint with
newer versions of typescript, I had to switch to the "next" unstable
version of react-scripts. It should not break stuff though.

See typescript-eslint/typescript-eslint#2442
2020-09-30 17:31:48 +02:00

35 lines
769 B
YAML

schema: '../api/graphql/schema/*.graphql'
overwrite: true
documents: src/**/*.graphql
generates:
./src/fragmentTypes.ts:
plugins:
- fragment-matcher
config:
module: es2015
apolloClientVersion: 3
./src/gqlTypes.ts:
plugins:
- typescript
./src/schema.json:
plugins:
- introspection
./src/:
plugins:
- add:
content: '/* eslint-disable @typescript-eslint/no-unused-vars, import/order */'
- typescript-operations
- typescript-react-apollo
preset: near-operation-file
presetConfig:
extension: .generated.tsx
baseTypesPath: gqlTypes.ts
config:
withComponent: false
withHOC: false
withHooks: true
hooks:
afterAllFileWrite:
- prettier --write