Skip to content

Commit

Permalink
remove type check
Browse files Browse the repository at this point in the history
  • Loading branch information
david-mcafee committed Oct 6, 2023
1 parent 8ec3c64 commit 04a5224
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/api-graphql/src/internals/InternalGraphQLAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,6 @@ export class InternalGraphQLAPIClass {

let customHeadersOptions;

// TODO: update type:
if (customHeaders && variables) {
customHeadersOptions = {
query: print(query as DocumentNode),
variables,
};
}

// TODO: Figure what we need to do to remove `!`'s.
const headers = {
...(!customEndpoint &&
Expand All @@ -254,7 +246,13 @@ export class InternalGraphQLAPIClass {
: {})) ||
{}),
// Custom headers included in Amplify configuration:
...(customHeaders && (await customHeaders(customHeadersOptions))),
...(customHeaders &&
(await customHeaders(
(customHeadersOptions = {
query: print(query as DocumentNode),
variables,
})
))),
// Headers from individual calls to `graphql`:
...additionalHeaders,
// User agent headers:
Expand Down

0 comments on commit 04a5224

Please sign in to comment.