aboutsummaryrefslogtreecommitdiffstats
path: root/webui/codegen.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'webui/codegen.yaml')
-rw-r--r--webui/codegen.yaml28
1 files changed, 26 insertions, 2 deletions
diff --git a/webui/codegen.yaml b/webui/codegen.yaml
index 8412b042..3cdb0517 100644
--- a/webui/codegen.yaml
+++ b/webui/codegen.yaml
@@ -1,8 +1,32 @@
schema: '../graphql/schema/*.graphql'
overwrite: true
+documents: src/**/*.graphql
generates:
- ./src/fragmentTypes.js:
+ ./src/fragmentTypes.ts:
plugins:
- - fragment-matcher
+ - fragment-matcher
config:
module: es2015
+ ./src/gqlTypes.ts:
+ plugins:
+ - typescript
+ ./src/schema.json:
+ plugins:
+ - introspection
+ ./src/:
+ plugins:
+ - add: '/* 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