Skip to content

Commit

Permalink
fix(json-schema): do not ignore operationHeaders defined in the confi…
Browse files Browse the repository at this point in the history
…g even if they are defined in the bundle (#4313)
  • Loading branch information
ardatan authored Aug 16, 2022
1 parent cbc0074 commit e545ffb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-parents-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@omnigraph/json-schema": patch
---

Do not ignore operationHeaders defined in the configuration even if there are some already defined in the bundle
5 changes: 5 additions & 0 deletions packages/loaders/json-schema/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export async function getGraphQLSchemaFromBundle(
...result,
};
};
} else {
operationHeaders = {
...bundledOperationHeaders,
...additionalOperationHeaders,
};
}
logger.info(`Creating the GraphQL Schema from dereferenced schema`);
return getGraphQLSchemaFromDereferencedJSONSchema(fullyDeferencedSchema, {
Expand Down

1 comment on commit e545ffb

@vercel
Copy link

@vercel vercel bot commented on e545ffb Aug 16, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.