diff options
author | Quentin Gliech <quentingliech@gmail.com> | 2020-02-03 23:08:26 +0100 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2020-02-11 20:54:36 +0100 |
commit | a2721971ba82a6ba0e735bd06cf555a4c1bca84e (patch) | |
tree | ae92cad5ff79350ffc11949032d7706e072d7b72 /webui/codegen.yaml | |
parent | aea42344ded1708361e7e1d577e9c6aa370ad64e (diff) | |
download | git-bug-a2721971ba82a6ba0e735bd06cf555a4c1bca84e.tar.gz |
webui: generate TS types for graphql queries
Diffstat (limited to 'webui/codegen.yaml')
-rw-r--r-- | webui/codegen.yaml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/webui/codegen.yaml b/webui/codegen.yaml index 8412b042..3cbcfb09 100644 --- a/webui/codegen.yaml +++ b/webui/codegen.yaml @@ -1,8 +1,31 @@ schema: '../graphql/schema/*.graphql' overwrite: true +documents: src/**/*.graphql generates: ./src/fragmentTypes.js: plugins: - fragment-matcher config: module: es2015 + ./src/gqlTypes.ts: + plugins: + - typescript + ./src/: + plugins: + - typescript-operations + - typescript-react-apollo + preset: near-operation-file + presetConfig: + extension: .generated.tsx + baseTypesPath: gqlTypes.ts + config: + withComponent: false + withHOC: false + withHooks: true + +config: + documentMode: documentNode + +hooks: + afterOneFileWrite: + - prettier --write |