Skip to content

Commit

Permalink
Merge pull request #300 from apollographql/taylor/connectors-debugging
Browse files Browse the repository at this point in the history
Adding support for `initialRequestConnectorsDebugging` to `EmbeddableSandbox`
  • Loading branch information
tayrrible authored Sep 10, 2024
2 parents 24f2d8a + bbcdabf commit f82e54a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-fans-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apollo/sandbox': minor
---

Adding support for `initialRequestConnectorsDebugging` to `EmbeddedSandbox`
7 changes: 7 additions & 0 deletions packages/sandbox/src/EmbeddedSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ type InternalEmbeddableSandboxOptions = EmbeddableSandboxOptions & {
__testLocal__?: boolean;
initialRequestQueryPlan?: boolean;
runtime?: string;
/**
* optional. defaults to `false`.
* Whether or not to include the `Apollo-Connectors-Debugging: true` header in requests
*/
initialRequestConnectorsDebugging?: boolean;
};

let idCounter = 0;
Expand Down Expand Up @@ -175,6 +180,8 @@ export class EmbeddedSandbox {
version: packageJSON.version,
runTelemetry: runTelemetry === undefined ? true : runTelemetry,
initialRequestQueryPlan: this.options.initialRequestQueryPlan ?? false,
initialRequestConnectorsDebugging:
this.options.initialRequestConnectorsDebugging ?? false,
shouldDefaultAutoupdateSchema:
this.options.initialState?.pollForSchemaUpdates ?? true,
endpointIsEditable: this.options.endpointIsEditable,
Expand Down

0 comments on commit f82e54a

Please sign in to comment.