File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ export function createGatewayRuntime<
232232 endpoint : config . persistedDocuments . endpoint ,
233233 accessToken : config . persistedDocuments . token ,
234234 } ,
235+ circuitBreaker : config . persistedDocuments . circuitBreaker ,
235236 // @ts -expect-error - Hive Console plugin options are not compatible yet
236237 allowArbitraryDocuments : allowArbitraryDocumentsForPersistedDocuments ,
237238 } ,
Original file line number Diff line number Diff line change 11import type { Plugin as EnvelopPlugin } from '@envelop/core' ;
22import type { GenericAuthPluginOptions } from '@envelop/generic-auth' ;
3+ import { CircuitBreakerConfiguration } from '@graphql-hive/core' ;
34import type { Logger , LogLevel } from '@graphql-hive/logger' ;
45import type { PubSub } from '@graphql-hive/pubsub' ;
56import type {
@@ -50,7 +51,6 @@ import { RequestIdOptions } from './plugins/useRequestId';
5051import { SubgraphErrorPluginOptions } from './plugins/useSubgraphErrorPlugin' ;
5152import { UpstreamRetryPluginOptions } from './plugins/useUpstreamRetry' ;
5253import { UpstreamTimeoutPluginOptions } from './plugins/useUpstreamTimeout' ;
53- import { CircuitBreakerConfiguration } from '@graphql-hive/core' ;
5454
5555export type { UnifiedGraphHandler , UnifiedGraphPlugin } ;
5656export type { TransportEntryAdditions , UnifiedGraphConfig } ;
@@ -441,7 +441,11 @@ export interface GatewayHivePersistedDocumentsOptions {
441441 /**
442442 * GraphQL Hive persisted documents CDN endpoint URL.
443443 */
444- endpoint : string ;
444+ endpoint : string | [ string , string ] ;
445+ /**
446+ * Circuit Breaker configuration to customize CDN failures handling and switch to mirror endpoint.
447+ */
448+ circuitBreaker ?: CircuitBreakerConfiguration ;
445449 /**
446450 * GraphQL Hive persisted documents CDN access token.
447451 */
You can’t perform that action at this time.
0 commit comments