-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to graphql-codegen #2081
Switch to graphql-codegen #2081
Conversation
87f8800
to
8c733d1
Compare
With newer version (>=8.3.1) of npm and Nodejs 16, there is a bug that |
portal/package.json
Outdated
@@ -53,6 +53,7 @@ | |||
"chart.js": "3.7.0", | |||
"chartjs-plugin-datalabels": "2.0.0", | |||
"classnames": "2.3.1", | |||
"core-js": "3.22.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicit polyfill is no longer needed.
f4c329a
to
c34898a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff --git a/portal/graphql.adminapi.codegen.yaml b/portal/graphql.adminapi.codegen.yaml
index 25c42c7bd..89bd72e91 100644
--- a/portal/graphql.adminapi.codegen.yaml
+++ b/portal/graphql.adminapi.codegen.yaml
@@ -3,16 +3,12 @@ documents: "./src/graphql/adminapi/**/*.graphql"
generates:
./src/graphql/adminapi/globalTypes.generated.ts:
plugins:
- - typescript
- - typescript-operations
- - typescript-react-apollo
-
+ - typescript
./src/graphql/adminapi/:
preset: near-operation-file
presetConfig:
extension: .generated.ts
baseTypesPath: ./globalTypes.generated.ts
plugins:
- - typescript
- - typescript-operations
- - typescript-react-apollo
+ - typescript-operations
+ - typescript-react-apollo
https://www.graphql-code-generator.com/docs/advanced/generated-files-colocation
According to the doc, we should configure the plugins this way so avoid duplicated generated code.
c34898a
to
e05e9f8
Compare
e05e9f8
to
5a32c6a
Compare
ref #1721