diff --git a/packages/api-graphql/src/internals/InternalGraphQLAPI.ts b/packages/api-graphql/src/internals/InternalGraphQLAPI.ts index efa9a846828..c6cacebe038 100644 --- a/packages/api-graphql/src/internals/InternalGraphQLAPI.ts +++ b/packages/api-graphql/src/internals/InternalGraphQLAPI.ts @@ -375,7 +375,7 @@ export class InternalGraphQLAPIClass { variables, appSyncGraphqlEndpoint: config?.endpoint, region: config?.region, - authenticationType: config?.defaultAuthMode, + authenticationType: authMode ?? config?.defaultAuthMode, apiKey: config?.apiKey, additionalHeaders, },