Skip to content

Commit

Permalink
Add the jwtToken support for the AWS_APPSYNC configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-so committed Jan 23, 2021
1 parent 8bba2d2 commit 1884e05
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -15,6 +15,7 @@ export class AppSyncSubscriptionProvider extends SubscriptionProvider {
"aws_appsync_region": "us-west-2",
"aws_appsync_authenticationType": "API_KEY",
"aws_appsync_apiKey": "..."
"aws_appsync_jwtToken" "..."
}
*/

Expand All @@ -23,7 +24,8 @@ export class AppSyncSubscriptionProvider extends SubscriptionProvider {
const region = this.connectionParams.aws_appsync_region;
const auth = {
type: this.connectionParams.aws_appsync_authenticationType,
apiKey: this.connectionParams.aws_appsync_apiKey,
...this.connectionParams.aws_appsync_apiKey ? {apiKey: this.connectionParams.aws_appsync_apiKey} : {},
...this.connectionParams.aws_appsync_jwtToken ? { jwtToken: this.connectionParams.aws_appsync_jwtToken } : {},
};

const httpLink = createHttpLink({ uri: url });
Expand Down

0 comments on commit 1884e05

Please sign in to comment.