-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: Sync codegen behavior implementation adding generateModelsSync #894
Conversation
packages/graphql-generator/src/vendor/@graphql-codegen/core/MAINTENANCE.md
Outdated
Show resolved
Hide resolved
packages/graphql-generator/src/vendor/@graphql-codegen/core/MAINTENANCE.md
Show resolved
Hide resolved
packages/graphql-generator/src/vendor/@graphql-codegen/core/MAINTENANCE.md
Outdated
Show resolved
Hide resolved
packages/graphql-generator/src/vendor/@graphql-codegen/core/MAINTENANCE.md
Outdated
Show resolved
Hide resolved
@@ -25,7 +25,7 @@ | |||
"@aws-amplify/graphql-docs-generator": "4.2.1", | |||
"@aws-amplify/graphql-generator": "0.4.6", | |||
"@aws-amplify/graphql-types-generator": "3.6.0", | |||
"@graphql-codegen/core": "2.6.6", |
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.
Without this change, our code depends on 2 versions of core. Applying this so that we only have a single version in our dependency list for the monorepo
@@ -17,18 +17,23 @@ | |||
"aws" | |||
], | |||
"scripts": { | |||
"build": "tsc", | |||
"build": "tsc && yarn check-codegen-version", |
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.
Including the version check in the build process. As discussed, this will push the developer to look at the maintenance instructions if the version from npm is different than the one adapted in the vendor folder.
Description of changes
This change translates the vendored code for codegen, adapting it so that it isn't async. Steps to adapt the code have been made as simple as possible where complexity is captured in related code to make upgrades as easy as possible as we maintain this. Directions are documented.
@graphql-codegen/core
forkSuggested review pattern:
@graphql-codegen/core
file across@graphql-codegen/core
.codegenSync
behaviorgenerateModelsSync
implementationThe copied code has been modified as little as possible and it is not intended to conform to local repo patterns as this would make future maintenance more difficult
Codegen Paramaters Changed or Added
generateModelsSync
implementationDescription of how you validated changes
Checklist
yarn test
passespath
) behave differently on windows.type
,input
,enum
,interface
,union
and scalar types.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.