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: include default values in index arg validation #9759

Merged
merged 1 commit into from
Feb 18, 2022
Merged

fix: include default values in index arg validation #9759

merged 1 commit into from
Feb 18, 2022

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 14, 2022

Create and update mutations generate a VTL snippet that verifies
that partial sort keys are not provided. However, this snippet
only checks for the arguments in $ctx.args.input, which does
not include default or computed values. These values are available
alongside the user inputs in a variable called $mergedValues.
This commit updates the argument checking logic to use the
merged values instead of the raw input values.

Fixes: #9666

Create and update mutations generate a VTL snippet that verifies
that partial sort keys are not provided. However, this snippet
only checks for the arguments in $ctx.args.input, which does
not include default or computed values. These values are available
alongside the user inputs in a variable called $mergedValues.
This commit updates the argument checking logic to use the
merged values instead of the raw input values.

Fixes: #9666
@cjihrig cjihrig requested a review from a team as a code owner February 14, 2022 22:20
@codecov-commenter
Copy link

Codecov Report

Merging #9759 (ac68147) into master (d061d92) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9759   +/-   ##
=======================================
  Coverage   53.01%   53.01%           
=======================================
  Files         830      830           
  Lines       46010    46010           
  Branches     9826     9826           
=======================================
  Hits        24390    24390           
  Misses      19602    19602           
  Partials     2018     2018           
Impacted Files Coverage Δ
...amplify-graphql-index-transformer/src/resolvers.ts 99.59% <ø> (ø)

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 d061d92...ac68147. Read the comment docs.

Copy link
Contributor

@lazpavel lazpavel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sundersc sundersc left a comment

Choose a reason for hiding this comment

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

LGTM.

@sundersc sundersc merged commit e135e42 into aws-amplify:master Feb 18, 2022
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v7.6.22 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.6.22.

@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
5 participants