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

graphql: utilize default auth #12586

Merged
merged 6 commits into from
Nov 19, 2023
Merged

graphql: utilize default auth #12586

merged 6 commits into from
Nov 19, 2023

Conversation

iartemiev
Copy link
Contributor

@iartemiev iartemiev commented Nov 17, 2023

Description of changes

We don't utilize the defaultAuthMode inside of _graphql, which prevents us from signing the request correctly when IAM is the default auth mode

This PR defaults authMode to defaultAuthMode unless an explicit authMode was passed in at the client or call site.

  • Also: updates pretty-quick dep. Necessary after Prettier was upgraded to unblock pre-commit husky hook. Nvm. pretty-quick doesn't seem to support prettier@3 at all. We'll need to find modify the pre-commit hook with a shell command to run prettier or use a newer pretty-quick equivalent tool

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

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

@iartemiev iartemiev requested review from a team as code owners November 17, 2023 22:02
stocaaro
stocaaro previously approved these changes Nov 17, 2023
alharris-at
alharris-at previously approved these changes Nov 17, 2023
} = resolveConfig(amplify);

const authMode = explicitAuthMode ?? defaultAuthMode;

Copy link
Contributor Author

@iartemiev iartemiev Nov 17, 2023

Choose a reason for hiding this comment

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

Around line 327 of this file we skip setting signingServiceInfo when authMode is undefined. That's the source of the bug.

@iartemiev iartemiev dismissed stale reviews from alharris-at and stocaaro via e762c14 November 17, 2023 22:21
@iartemiev iartemiev merged commit 4d80239 into main Nov 19, 2023
30 checks passed
@iartemiev iartemiev deleted the gql-use-default-auth branch November 19, 2023 20:44
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

5 participants