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: prevent @index/@primaryKey from referencing itself #8561

Merged
merged 1 commit into from Oct 27, 2021
Merged

fix: prevent @index/@primaryKey from referencing itself #8561

merged 1 commit into from Oct 27, 2021

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Oct 26, 2021

Description of changes

This commit prevents the sortKeyFields on @index and @primaryKey from including the field the directive is defined on.

Description of how you validated changes

Manual and unit testing

Checklist

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

This commit prevents the sortKeyFields on @Index and @PrimaryKey
from including the field the directive is defined on.
@cjihrig cjihrig requested a review from a team as a code owner October 26, 2021 19:30
@codecov-commenter
Copy link

Codecov Report

Merging #8561 (e61bb60) into master (02894dc) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8561      +/-   ##
==========================================
+ Coverage   57.14%   57.15%   +0.01%     
==========================================
  Files         724      724              
  Lines       40845    40856      +11     
  Branches     8360     8361       +1     
==========================================
+ Hits        23342    23353      +11     
  Misses      16693    16693              
  Partials      810      810              
Impacted Files Coverage Δ
...index-transformer/src/graphql-index-transformer.ts 100.00% <100.00%> (ø)
...transformer/src/graphql-primary-key-transformer.ts 100.00% <100.00%> (ø)
...ges/amplify-graphql-index-transformer/src/utils.ts 100.00% <100.00%> (ø)

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 02894dc...e61bb60. Read the comment docs.

@ammarkarachi ammarkarachi merged commit fc5a134 into aws-amplify:master Oct 27, 2021
@cjihrig cjihrig deleted the self branch November 4, 2021 21:53
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

4 participants