Releases: graphql-hive/console
[email protected]
[email protected]
[email protected]
Patch Changes
- Updated dependencies
[69e2f74]:- hive-console-sdk-rs@0.2.1
[email protected]
Minor Changes
- #7346
f266368
Thanks @n1ru4l! - Upgrade graphql-inspector/core to v7 and update the
models to be able to handle the new change objects. GraphQL Inspector now supports directive
changes and improves the accuracy of the severity level for several change types. This will
improve schema checks to make them more accurate and more complete. See graphql-inspector's
changelog for details.
Patch Changes
- #7328
c024ea7
Thanks @adambenhassen! - ExposeProject.createdAtfield via
the public GraphQL API.
@graphql-hive/[email protected]
Minor Changes
-
#7346
f266368
Thanks @n1ru4l! - Add support for providing a logger object via
HivePluginOptions.It is possible to provide the following options:
- 'trace'
- 'debug'
- 'info' default
- 'warn'
- 'error'
import { createHive } from '@graphql-hive/core' const client = createHive({ logger: 'info' })
In addition to that, it is also possible to provide a Hive Logger instance, that allows more
control over how you want to log and forward logs.import { createHive } from '@graphql-hive/core' import { Logger } from '@graphql-hive/logger' const client = createHive({ logger: new Logger() })
Head to our Hive Logger documentation to learn
more.
The
HivePluginOptions.debugoption is now deprecated. Instead, please use thelogger
option to control logging levels.import { createHive } from '@graphql-hive/core' const client = createHive({ - debug: process.env.DEBUG === "1", + logger: process.env.DEBUG === "1" ? "debug" : "info", })Note: If the
loggerproperty is provided, thedebugoption is ignored.
The
HivePluginOptions.agent.loggeroption is now deprecated. Instead, please provide
HivePluginOptions.logger.import { createHive } from '@graphql-hive/core' const logger = new Logger() const client = createHive({ agent: { - logger, }, + logger, })Note: If both options are provided, the
agentoption is ignored. -
#7346
f266368
Thanks @n1ru4l! - Persisted Documents ImprovementsPersisted documents now support specifying a mirror endpoint that will be used in case the main
CDN is unreachable. Provide an array of endpoints to the client configuration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' } } })
In addition to that, the underlying logic for looking up documents now uses a circuit breaker. If
a single endpoint is unreachable, further lookups on that endpoint are skipped.The behaviour of the circuit breaker can be customized via the
circuitBreakerconfiguration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' }, circuitBreaker: { // open circuit if 50 percent of request result in an error errorThresholdPercentage: 50, // start monitoring the circuit after 10 requests volumeThreshold: 10, // time before the backend is tried again after the circuit is open resetTimeout: 30_000 } } })
Patch Changes
- Updated dependencies
[f266368,
f266368,
f266368]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7346
f266368
Thanks @n1ru4l! - Add support for providing a logger object via
HivePluginOptions.It is possible to provide the following options:
- 'trace'
- 'debug'
- 'info' default
- 'warn'
- 'error'
import { createHive } from '@graphql-hive/core' const client = createHive({ logger: 'info' })
In addition to that, it is also possible to provide a Hive Logger instance, that allows more
control over how you want to log and forward logs.import { createHive } from '@graphql-hive/core' import { Logger } from '@graphql-hive/logger' const client = createHive({ logger: new Logger() })
Head to our Hive Logger documentation to learn
more.
The
HivePluginOptions.debugoption is now deprecated. Instead, please use thelogger
option to control logging levels.import { createHive } from '@graphql-hive/core' const client = createHive({ - debug: process.env.DEBUG === "1", + logger: process.env.DEBUG === "1" ? "debug" : "info", })Note: If the
loggerproperty is provided, thedebugoption is ignored.
The
HivePluginOptions.agent.loggeroption is now deprecated. Instead, please provide
HivePluginOptions.logger.import { createHive } from '@graphql-hive/core' const logger = new Logger() const client = createHive({ agent: { - logger, }, + logger, })Note: If both options are provided, the
agentoption is ignored.
Patch Changes
- Updated dependencies
[f266368,
f266368,
f266368]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#7346
f266368
Thanks @n1ru4l! - Add support for providing a logger object via
HivePluginOptions.It is possible to provide the following options:
- 'trace'
- 'debug'
- 'info' default
- 'warn'
- 'error'
import { createHive } from '@graphql-hive/core' const client = createHive({ logger: 'info' })
In addition to that, it is also possible to provide a Hive Logger instance, that allows more
control over how you want to log and forward logs.import { createHive } from '@graphql-hive/core' import { Logger } from '@graphql-hive/logger' const client = createHive({ logger: new Logger() })
Head to our Hive Logger documentation to learn
more.
The
HivePluginOptions.debugoption is now deprecated. Instead, please use thelogger
option to control logging levels.import { createHive } from '@graphql-hive/core' const client = createHive({ - debug: process.env.DEBUG === "1", + logger: process.env.DEBUG === "1" ? "debug" : "info", })Note: If the
loggerproperty is provided, thedebugoption is ignored.
The
HivePluginOptions.agent.loggeroption is now deprecated. Instead, please provide
HivePluginOptions.logger.import { createHive } from '@graphql-hive/core' const logger = new Logger() const client = createHive({ agent: { - logger, }, + logger, })Note: If both options are provided, the
agentoption is ignored. -
#7346
f266368
Thanks @n1ru4l! - Persisted Documents ImprovementsPersisted documents now support specifying a mirror endpoint that will be used in case the main
CDN is unreachable. Provide an array of endpoints to the client configuration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' } } })
In addition to that, the underlying logic for looking up documents now uses a circuit breaker. If
a single endpoint is unreachable, further lookups on that endpoint are skipped.The behaviour of the circuit breaker can be customized via the
circuitBreakerconfiguration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' }, circuitBreaker: { // open circuit if 50 percent of request result in an error errorThresholdPercentage: 50, // start monitoring the circuit after 10 requests volumeThreshold: 10, // time before the backend is tried again after the circuit is open resetTimeout: 30_000 } } })
-
#7346
f266368
Thanks @n1ru4l! - New CDN Artifact FetcherWe have a new interface for fetching CDN artifacts (such as supergraph and services) with a cache
from the CDN. This fetcher supports providing a mirror endpoint and comes with a circuit breaker
under the hood.const supergraphFetcher = createCDNArtifactFetcher({ endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessKey: '' }) supergraphFetcher.fetch()
createSupergraphSDLFetcheris now deprecated. Please upgrade to usecreateCDNArtifactFetcher.
@graphql-hive/[email protected]
Minor Changes
- #7346
f266368
Thanks @n1ru4l! - Upgrade graphql-inspector/core to v7 and update the
models to be able to handle the new change objects. GraphQL Inspector now supports directive
changes and improves the accuracy of the severity level for several change types. This will
improve schema checks to make them more accurate and more complete. See graphql-inspector's
changelog for details.
Patch Changes
@graphql-hive/[email protected]
Minor Changes
-
#7346
f266368
Thanks @n1ru4l! - Add support for providing a logger object via
HivePluginOptions.It is possible to provide the following options:
- 'trace'
- 'debug'
- 'info' default
- 'warn'
- 'error'
import { createHive } from '@graphql-hive/core' const client = createHive({ logger: 'info' })
In addition to that, it is also possible to provide a Hive Logger instance, that allows more
control over how you want to log and forward logs.import { createHive } from '@graphql-hive/core' import { Logger } from '@graphql-hive/logger' const client = createHive({ logger: new Logger() })
Head to our Hive Logger documentation to learn
more.
The
HivePluginOptions.debugoption is now deprecated. Instead, please use thelogger
option to control logging levels.import { createHive } from '@graphql-hive/core' const client = createHive({ - debug: process.env.DEBUG === "1", + logger: process.env.DEBUG === "1" ? "debug" : "info", })Note: If the
loggerproperty is provided, thedebugoption is ignored.
The
HivePluginOptions.agent.loggeroption is now deprecated. Instead, please provide
HivePluginOptions.logger.import { createHive } from '@graphql-hive/core' const logger = new Logger() const client = createHive({ agent: { - logger, }, + logger, })Note: If both options are provided, the
agentoption is ignored. -
#7346
f266368
Thanks @n1ru4l! - Persisted Documents ImprovementsPersisted documents now support specifying a mirror endpoint that will be used in case the main
CDN is unreachable. Provide an array of endpoints to the client configuration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' } } })
In addition to that, the underlying logic for looking up documents now uses a circuit breaker. If
a single endpoint is unreachable, further lookups on that endpoint are skipped.The behaviour of the circuit breaker can be customized via the
circuitBreakerconfiguration.import { createClient } from '@graphql-hive/core' const client = createClient({ experimental__persistedDocuments: { cdn: { endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688' ], accessToken: '' }, circuitBreaker: { // open circuit if 50 percent of request result in an error errorThresholdPercentage: 50, // start monitoring the circuit after 10 requests volumeThreshold: 10, // time before the backend is tried again after the circuit is open resetTimeout: 30_000 } } })
-
#7346
f266368
Thanks @n1ru4l! - Supergraph Manager ImprovementsPersisted documents now support specifying a mirror endpoint that will be used in case the main
CDN is unreachable. Provide an array of endpoints to the supergraph manager configuration.import { createSupergraphManager } from '@graphql-hive/apollo' const supergraphManager = createSupergraphManager({ endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688/supergraph', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688/supergraph' ], key: '' })
In addition to that, the underlying logic for looking up documents now uses a circuit breaker. If
a single endpoint is unreachable, further lookups on that endpoint are skipped.import { createSupergraphManager } from '@graphql-hive/apollo' const supergraphManager = createSupergraphManager({ endpoint: [ 'https://cdn.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688/supergraph', 'https://cdn-mirror.graphql-hive.com/artifacts/v1/9fb37bc4-e520-4019-843a-0c8698c25688/supergraph' ], key: '', circuitBreaker: { // open circuit if 50 percent of request result in an error errorThresholdPercentage: 50, // start monitoring the circuit after 10 requests volumeThreshold: 10, // time before the backend is tried again after the circuit is open resetTimeout: 30_000 } })
Patch Changes
- Updated dependencies
[f266368,
f266368,
f266368]:- @graphql-hive/[email protected]
[email protected]
Minor Changes
-
#7306
29de664
Thanks @kamilkisiela! - Updated federation-composition to
v0.21.0- Enhanced auth directive validation: The federation-composition now enforces correct
placement of auth directives (@authenticated,@requiresScopes,@policy) by rejecting
attempts to place them on interfaces, interface fields, or interface objects with the new
AUTH_REQUIREMENTS_APPLIED_ON_INTERFACEvalidation rule. - Transitive auth requirements checking: Added a new validation rule that ensures fields using
@requiresspecify at least the auth requirements of the fields they select. If a field doesn't
carry forward required auth directives, composition fails with a
MISSING_TRANSITIVE_AUTH_REQUIREMENTSerror. - Auth requirements inheritance: Interface types and fields now properly inherit
@authenticated,@requiresScopes, and@policydirectives from the object types that
implement them. @costdirective restrictions: The@costdirective can no longer be placed on interface
types, their fields, or field arguments. Invalid placements now result in composition errors
instead of being silently accepted.- Improved
@listSizevalidation: The directive now validates thatsizedFieldspoint to
actual list fields rather than integer counters. Additionally,slicingArgumentsvalidation has
been added to ensure only arguments that exist in all subgraphs are retained. - Fixed
EXTERNAL_MISSING_ON_BASErule: Resolved false positives when handling
@interfaceObjectcorner-cases, particularly for@externalfields on object types provided by
interface objects.
- Enhanced auth directive validation: The federation-composition now enforces correct
-
#7291
802315e
Thanks @adambenhassen! - eliminate clickhouse query timeouts
and improve read times of large amounts of traces in dashboard