-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @omnigraph/[email protected] for the project I'm working on.
operationHeaders do not get merged into the transport headers and this causes an issue where access_token generated for schemaHeaders gets hardcoded into the supergraph, completely ignoring the access_token provided by operationHeaders at runtime.
Here is the diff that solved my problem:
diff --git a/node_modules/@omnigraph/odata/esm/index.js b/node_modules/@omnigraph/odata/esm/index.js
index 65fb3e5..306d0ce 100644
--- a/node_modules/@omnigraph/odata/esm/index.js
+++ b/node_modules/@omnigraph/odata/esm/index.js
@@ -829,7 +829,7 @@ export async function loadNonExecutableGraphQLSchemaFromOData(name, { endpoint:
kind: 'odata',
subgraph: name,
location: endpoint,
- headers: Object.entries(schemaHeaders || []),
+ headers: Object.entries(operationHeaders || schemaHeaders || []),
options: {
batch,
expandNavProps,This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels