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: Multi-level item in selectionSet is not received #12701

Merged
merged 18 commits into from
Dec 21, 2023
Merged

fix: Multi-level item in selectionSet is not received #12701

merged 18 commits into from
Dec 21, 2023

Conversation

erickriva
Copy link
Contributor

@erickriva erickriva commented Dec 13, 2023

Fix for issue #12665

@erickriva erickriva requested a review from a team as a code owner December 13, 2023 04:14
Copy link
Contributor

@iartemiev iartemiev left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! The PR looks good overall. I suggested a couple of changes to get the build passing.

packages/api-graphql/src/internals/APIClient.ts Outdated Show resolved Hide resolved
packages/api-graphql/src/internals/APIClient.ts Outdated Show resolved Hide resolved
erickriva and others added 3 commits December 15, 2023 10:42
Make `modelName` param in `dotNotationToObject` function required

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Assert `relatedModel` as `ModelFieldType['model']` in `dotNotationToObject` function

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
@erickriva erickriva requested a review from a team as a code owner December 15, 2023 14:12
@iartemiev
Copy link
Contributor

@erickriva - bundle size check failed. I just pushed up a commit increasing the limit for this package.

iartemiev
iartemiev previously approved these changes Dec 15, 2023
@iartemiev iartemiev requested a review from a team December 15, 2023 17:01
Copy link
Contributor

@svidgen svidgen left a comment

Choose a reason for hiding this comment

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

I think I'm 98% there. I'm just a little confused on one point around the recursive merge at the moment.

I've also included a suggested docstring, but this was done in passing. It's a nit, largely written so I could summarize what I was looking at.

packages/api-graphql/src/internals/APIClient.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@iartemiev iartemiev left a comment

Choose a reason for hiding this comment

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

Blocking on the prototype pollution issue discovered by CodeQL

@iartemiev
Copy link
Contributor

@erickriva the prototype pollution mitigation looks good! The only apparent remaining blocker is a minor lint error:

ERROR: src/internals/APIClient.ts:496:11 - Identifier 'key' is never reassigned; use 'const' instead of 'let'.

You can verify locally by running yarn lint

Fixed lint error

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Copy link
Contributor

@svidgen svidgen left a comment

Choose a reason for hiding this comment

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

Awesome! Thank-you!

@iartemiev iartemiev merged commit 4a3a756 into aws-amplify:main Dec 21, 2023
30 checks passed
@iartemiev
Copy link
Contributor

@erickriva - PR has been merged. Thank you again for contributing!
Your changes will be automatically published to aws-amplify@unstable within 1-2 hours.
They'll be included in the next patch release of aws-amplify within the next week.

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