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(graphql-key-transformer): only modify GSI sort key when present #6742

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

edwardfoyle
Copy link
Contributor

Issue #, if available:
#6634
Description of changes:
Only sets the composite sort key in the VTL resolver if all fields in the key are preset in the mutation.

Also adds unit and e2e tests for this case.

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

@edwardfoyle edwardfoyle requested a review from a team as a code owner February 25, 2021 23:08
@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #6742 (4b7225c) into master (bda37b4) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6742      +/-   ##
==========================================
+ Coverage   56.80%   56.82%   +0.02%     
==========================================
  Files         486      486              
  Lines       22033    22034       +1     
  Branches     4402     4403       +1     
==========================================
+ Hits        12515    12521       +6     
+ Misses       8641     8636       -5     
  Partials      877      877              
Impacted Files Coverage Δ
...nction-runtime-provider/src/utils/legacyPackage.ts 0.00% <ø> (ø)
...ages/graphql-key-transformer/src/KeyTransformer.ts 92.93% <100.00%> (+1.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e6da64...4b7225c. Read the comment docs.

Copy link
Contributor

@attilah attilah left a comment

Choose a reason for hiding this comment

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

LGTM, good job! 🥇 the tests!

@edwardfoyle edwardfoyle merged commit 7cbd396 into aws-amplify:master Feb 26, 2021
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants