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(data): fix library configuration options headers for subscriptions (#12590) #12659

Merged
merged 17 commits into from
Dec 4, 2023

Conversation

david-mcafee
Copy link
Member

@david-mcafee david-mcafee commented Nov 30, 2023

Description of changes

Passes headers to the AWSAppSyncRealTimeProvider when calling Amplify.configure. For example:

import { Amplify } from "aws-amplify";
import config from "./amplifyconfiguration.json";

Amplify.configure(config, {
    API: {
        GraphQL: {
            headers: async () => ({
                Authorization: 'example-token'
            }),
        },
    },
});

headers here was previously graphql_headers in V5. These are separate from custom headers, and will always take precedence over custom headers (i.e. the Authorization token will never be overwritten).

Issue #, if available

#12590

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.

@david-mcafee david-mcafee changed the title fix(data): fix singleton subscription headers fix(data): fix library configuration options headers for subscriptions; update core headers type Dec 1, 2023
@david-mcafee david-mcafee changed the title fix(data): fix library configuration options headers for subscriptions; update core headers type fix(data): fix library configuration options headers for subscriptions Dec 1, 2023
@david-mcafee david-mcafee self-assigned this Dec 1, 2023
@david-mcafee david-mcafee changed the title fix(data): fix library configuration options headers for subscriptions fix(data): fix library configuration options headers for subscriptions (#12590) Dec 1, 2023
@david-mcafee david-mcafee marked this pull request as ready for review December 1, 2023 02:47
@david-mcafee david-mcafee requested review from a team as code owners December 1, 2023 02:47
@david-mcafee david-mcafee requested review from iartemiev and a team December 1, 2023 18:52
Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

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

Looks good

thanks @david-mcafee 🎖️

Copy link
Contributor

@kvramyasri7 kvramyasri7 left a comment

Choose a reason for hiding this comment

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

Looks good

thanks @david-mcafee 🎖️🥇🎖️

@david-mcafee david-mcafee merged commit e101cea into main Dec 4, 2023
31 checks passed
@david-mcafee david-mcafee deleted the 12590 branch December 4, 2023 16:55
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