Skip to content
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(api-graphql): add .enums property to the GQL client #12980

Merged
merged 6 commits into from
Feb 12, 2024

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Feb 7, 2024

Description of changes

Added .enums property generation for the client returned by generateClient().

  • Reorganized/refactored the source code

Issue #, if available

Description of how you validated changes

  • Unit testing
  • Manual testing in a Next.js sample app

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners February 7, 2024 23:20
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
"@aws-amplify/data-schema-types": ["../../node_modules/@aws-amplify/data-schema-types"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paths alias is required to allow accessing the unique symbol __modelMeta__ inside the workspace, so Schema can infer correct enum type in the unit test codebase.

@HuiSF
Copy link
Contributor Author

HuiSF commented Feb 8, 2024

Caught an issue in the dependent @aws-amplify/data-schema-types package. Will fix and then update this PR.

Issue resolved.

iartemiev
iartemiev previously approved these changes Feb 9, 2024
iartemiev
iartemiev previously approved these changes Feb 12, 2024
iartemiev
iartemiev previously approved these changes Feb 12, 2024
stocaaro
stocaaro previously approved these changes Feb 12, 2024
@HuiSF HuiSF dismissed stale reviews from stocaaro and iartemiev via 70944b3 February 12, 2024 19:03
@HuiSF HuiSF merged commit 5c56101 into main Feb 12, 2024
30 checks passed
@HuiSF HuiSF deleted the hui/feat/api-graphql/enums branch February 12, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants