Releases: graphql-hive/console
@graphql-hive/[email protected]
Minor Changes
-
#7280
2cc443c
Thanks @n1ru4l! - Support circuit breaking for usage reporting.Circuit breaking is a fault-tolerance pattern that prevents a system from repeatedly calling a
failing service. When errors or timeouts exceed a set threshold, the circuit “opens,” blocking
further requests until the service recovers.This ensures that during a network issue or outage, the service using the Hive SDK remains healthy
and is not overwhelmed by failed usage reports or repeated retries.import { createClient } from '@graphql-hive/core' const client = createClient({ agent: { circuitBreaker: { /** * Count of requests before starting evaluating. * Default: 5 */ volumeThreshold: 5, /** * Percentage of requests failing before the circuit breaker kicks in. * Default: 50 */ errorThresholdPercentage: 1, /** * After what time the circuit breaker is attempting to retry sending requests in milliseconds * Default: 30_000 */ resetTimeout: 10_000 } } })
Patch Changes
- Updated dependencies
[2cc443c]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7280
2cc443c
Thanks @n1ru4l! - Support circuit breaking for usage reporting.Circuit breaking is a fault-tolerance pattern that prevents a system from repeatedly calling a
failing service. When errors or timeouts exceed a set threshold, the circuit “opens,” blocking
further requests until the service recovers.This ensures that during a network issue or outage, the service using the Hive SDK remains healthy
and is not overwhelmed by failed usage reports or repeated retries.import { createClient } from '@graphql-hive/core' const client = createClient({ agent: { circuitBreaker: { /** * Count of requests before starting evaluating. * Default: 5 */ volumeThreshold: 5, /** * Percentage of requests failing before the circuit breaker kicks in. * Default: 50 */ errorThresholdPercentage: 1, /** * After what time the circuit breaker is attempting to retry sending requests in milliseconds * Default: 30_000 */ resetTimeout: 10_000 } } })
Patch Changes
- Updated dependencies
[2cc443c]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7280
2cc443c
Thanks @n1ru4l! - Support circuit breaking for usage reporting.Circuit breaking is a fault-tolerance pattern that prevents a system from repeatedly calling a
failing service. When errors or timeouts exceed a set threshold, the circuit “opens,” blocking
further requests until the service recovers.This ensures that during a network issue or outage, the service using the Hive SDK remains healthy
and is not overwhelmed by failed usage reports or repeated retries.import { createClient } from '@graphql-hive/core' const client = createClient({ agent: { circuitBreaker: { /** * Count of requests before starting evaluating. * Default: 5 */ volumeThreshold: 5, /** * Percentage of requests failing before the circuit breaker kicks in. * Default: 50 */ errorThresholdPercentage: 1, /** * After what time the circuit breaker is attempting to retry sending requests in milliseconds * Default: 30_000 */ resetTimeout: 10_000 } } })
@graphql-hive/[email protected]
Patch Changes
- Updated dependencies
[2cc443c]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7280
2cc443c
Thanks @n1ru4l! - Support circuit breaking for usage reporting.Circuit breaking is a fault-tolerance pattern that prevents a system from repeatedly calling a
failing service. When errors or timeouts exceed a set threshold, the circuit “opens,” blocking
further requests until the service recovers.This ensures that during a network issue or outage, the service using the Hive SDK remains healthy
and is not overwhelmed by failed usage reports or repeated retries.import { createClient } from '@graphql-hive/core' const client = createClient({ agent: { circuitBreaker: { /** * Count of requests before starting evaluating. * Default: 5 */ volumeThreshold: 5, /** * Percentage of requests failing before the circuit breaker kicks in. * Default: 50 */ errorThresholdPercentage: 1, /** * After what time the circuit breaker is attempting to retry sending requests in milliseconds * Default: 30_000 */ resetTimeout: 10_000 } } })
Patch Changes
- Updated dependencies
[2cc443c]:- @graphql-hive/[email protected]
[email protected]
[email protected]
Minor Changes
-
#7246
cc6cd28
Thanks @ardatan! - Breaking;SupergraphFetchernow has two different modes: async and sync. You can choose between
SupergraphFetcherAsyncClientandSupergraphFetcherSyncClientbased on your needs. See the
examples at the bottom.SupergraphFetchernow has a newretry_countparameter to specify how many times to retry
fetching the supergraph in case of failures.PersistedDocumentsManagernew needsuser_agentparameter to be sent to Hive Console when
fetching persisted queries.UsageAgent::newis nowUsageAgent::try_newand it returns aResultwithArc, so you can
freely clone it across threads. This change was made to handle potential errors during the
creation of the HTTP client. Make sure to handle theResultwhen creating aUsageAgent.
// Sync Mode let fetcher = SupergraphFetcher::try_new_sync(/* params */) .map_err(|e| anyhow!("Failed to create SupergraphFetcher: {}", e))?; // Use the fetcher to fetch the supergraph (Sync) let supergraph = fetcher .fetch_supergraph() .map_err(|e| anyhow!("Failed to fetch supergraph: {}", e))?; // Async Mode let fetcher = SupergraphFetcher::try_new_async(/* params */) .map_err(|e| anyhow!("Failed to create SupergraphFetcher: {}", e))?; // Use the fetcher to fetch the supergraph (Async) let supergraph = fetcher .fetch_supergraph() .await .map_err(|e| anyhow!("Failed to fetch supergraph: {}", e))?;
[email protected]
Patch Changes
- Updated dependencies
[cc6cd28]:- hive-console-sdk-rs@0.2.0
@graphql-hive/[email protected]
Patch Changes
- Updated dependencies
[582bc0e]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7264
582bc0e
Thanks @n1ru4l! - Introduce debug log level. HTTP retry log pollute
the error log. The retries are now logged to the debug level. In order to see debug logs set the
debugoption to true.const hive = createHive({ debug: true })
If you are using a custom logger, make sure to provide a
debuglogging method implementation.const hive = createHive({ debug: true, agent: { logger: { info() {}, error() {}, debug() {} } } })
Patch Changes
- Updated dependencies
[582bc0e]:- @graphql-hive/[email protected]