diff --git a/packages/api-graphql/src/utils/resolveLibraryOptions.ts b/packages/api-graphql/src/utils/resolveLibraryOptions.ts index 3213c357b90..82702f5c16a 100644 --- a/packages/api-graphql/src/utils/resolveLibraryOptions.ts +++ b/packages/api-graphql/src/utils/resolveLibraryOptions.ts @@ -7,6 +7,7 @@ import { AmplifyClassV6 } from '@aws-amplify/core'; * @internal */ export const resolveLibraryOptions = (amplify: AmplifyClassV6) => { - const { headers, withCredentials } = amplify.libraryOptions?.API?.GraphQL; + const headers = amplify.libraryOptions?.API?.GraphQL?.headers; + const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials; return { headers, withCredentials }; };