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

fix: support key directive in model introspection schema gen #628

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

alharris-at
Copy link
Contributor

@alharris-at alharris-at commented Jul 13, 2023

Description of changes

Today, a key directive in GraphQLV1 that uses a belongsTo FK will cause the model introspection schema to fail. This addresses that issue, by no longer removing the field hardcoded by 'id' but instead checking if it's the model pk.

Issue #, if available

N/A - ticket

Description of how you validated changes

Added unit tests which previously failed, added v2 test for comparison of behavior.

Checklist

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

@codecov-commenter
Copy link

Codecov Report

Merging #628 (38c1c9c) into main (ee9ac44) will decrease coverage by 1.51%.
The diff coverage is 83.33%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #628      +/-   ##
==========================================
- Coverage   85.93%   84.43%   -1.51%     
==========================================
  Files         152      152              
  Lines        7489     6437    -1052     
  Branches     1956     1384     -572     
==========================================
- Hits         6436     5435    -1001     
+ Misses        960      902      -58     
- Partials       93      100       +7     
Impacted Files Coverage Δ
...rc/visitors/appsync-model-introspection-visitor.ts 95.65% <80.00%> (-3.07%) ⬇️
...nc-modelgen-plugin/src/visitors/appsync-visitor.ts 94.61% <100.00%> (-1.70%) ⬇️

... and 115 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alharris-at alharris-at merged commit 7397ab9 into main Jul 14, 2023
@alharris-at alharris-at deleted the bug-fix-in-v1 branch July 14, 2023 15:39
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.

4 participants