Skip to content

Releases: graphql-hive/console

@graphql-hive/[email protected]

18 Nov 10:07
c222824

Choose a tag to compare

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

@graphql-hive/[email protected]

18 Nov 10:07
c222824

Choose a tag to compare

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

@graphql-hive/[email protected]

18 Nov 10:07
c222824

Choose a tag to compare

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]

18 Nov 10:07
c222824

Choose a tag to compare

Patch Changes

@graphql-hive/[email protected]

18 Nov 10:07
c222824

Choose a tag to compare

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

[email protected]

17 Nov 15:56
c778450

Choose a tag to compare

Minor Changes

[email protected]

17 Nov 15:56
c778450

Choose a tag to compare

Minor Changes

  • #7246
    cc6cd28
    Thanks @ardatan! - Breaking;

    • SupergraphFetcher now has two different modes: async and sync. You can choose between
      SupergraphFetcherAsyncClient and SupergraphFetcherSyncClient based on your needs. See the
      examples at the bottom.
    • SupergraphFetcher now has a new retry_count parameter to specify how many times to retry
      fetching the supergraph in case of failures.
    • PersistedDocumentsManager new needs user_agent parameter to be sent to Hive Console when
      fetching persisted queries.
    • UsageAgent::new is now UsageAgent::try_new and it returns a Result with Arc, 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 the Result when creating a UsageAgent.
    // 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]

17 Nov 15:56
c778450

Choose a tag to compare

Patch Changes

@graphql-hive/[email protected]

17 Nov 15:56
c778450

Choose a tag to compare

Patch Changes

@graphql-hive/[email protected]

17 Nov 15:56
c778450

Choose a tag to compare

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
    debug option to true.

    const hive = createHive({
      debug: true
    })

    If you are using a custom logger, make sure to provide a debug logging method implementation.

    const hive = createHive({
      debug: true,
      agent: {
        logger: {
          info() {},
          error() {},
          debug() {}
        }
      }
    })

Patch Changes