-
Notifications
You must be signed in to change notification settings - Fork 649
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
Bug: Graphql codegen issue in checkout folder #1114
base: main
Are you sure you want to change the base?
Conversation
@krunal-ss is attempting to deploy a commit to the Saleor Commerce Team on Vercel. A member of the Team first needs to authorize it. |
package.json
Outdated
@@ -3,28 +3,31 @@ | |||
"version": "0.1.0", | |||
"private": true, | |||
"type": "module", | |||
"license": "BSD-3-Clause", |
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.
please don't remove license from package.json 😄
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.
Fixed 😅
package.json
Outdated
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"predev": "pnpm run generate", | ||
"prebuild": "pnpm run generate", | ||
"lint": "next lint --dir src --fix", | ||
"generate": "graphql-codegen --config .graphqlrc.ts", | ||
"generate": "DOTENV_CONFIG_PATH=.env graphql-codegen -r dotenv/config --config ./src/checkout/codegen.yml && graphql-codegen --config .graphqlrc.ts", |
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.
Suggestion: I would rather see you add additional config entry to existing .graphqlrc.ts
instead of creating new config file.
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.
Added a new config. in .graphqlrc.ts
and remove codegen.yml
file
package.json
Outdated
"prepare": "husky install", | ||
"test": "playwright test" | ||
}, | ||
"dependencies": { | ||
"@adyen/adyen-web": "5.53.3", | ||
"@adyen/api-library": "15.0.0-beta", | ||
"@headlessui/react": "1.7.18", | ||
"@hookform/resolvers": "3.10.0", |
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.
Question: why those new dependencies are needed?
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.
Remove unwanted dependency as I was working with some new functionality.
"src/checkout/graphql/index.ts": { | ||
plugins: [ | ||
{ | ||
add: { |
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.
Question: why do you need to add this?
// THIS FILE IS GENERATED WITH `pnpm generate`
import "graphql/language/ast"
Description
codegen
) configuration was previously set to look for files only in thesrc/graphql/
folder.src/checkout/graphql/*.graphql
and worked only for thesrc/app
folder.Solution
codegen
configuration will now also look into thesrc/checkout/graphql/
folder.codegen.yml
file and generate/modify theindex.ts
file insrc/checkout/graphql/
.schema.graphql.json
file.