Upcoming Release Changes (#7345)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
TheGuildBot 2025-12-01 15:24:32 +02:00 committed by GitHub
parent f26636891b
commit 4a805afd94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 616 additions and 234 deletions

View file

@ -1,72 +0,0 @@
---
'@graphql-hive/core': minor
'@graphql-hive/apollo': minor
'@graphql-hive/envelop': minor
'@graphql-hive/yoga': minor
---
Add support for providing a logger object via `HivePluginOptions`.
It is possible to provide the following options:
- **'trace'**
- **'debug'**
- **'info'** default
- **'warn'**
- **'error'**
```ts
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.
```ts
import { createHive } from '@graphql-hive/core'
import { Logger } from '@graphql-hive/logger'
const client = createHive({
logger: new Logger()
})
```
Head to our [Hive Logger documentation](https://the-guild.dev/graphql/hive/docs/logger) to learn more.
___
**The `HivePluginOptions.debug` option is now deprecated.** Instead, please use the `logger` option to control logging levels.
```diff
import { createHive } from '@graphql-hive/core'
const client = createHive({
- debug: process.env.DEBUG === "1",
+ logger: process.env.DEBUG === "1" ? "debug" : "info",
})
```
**Note**: If the `logger` property is provided, the `debug` option is ignored.
___
**The `HivePluginOptions.agent.logger` option is now deprecated.** Instead, please provide
`HivePluginOptions.logger`.
```diff
import { createHive } from '@graphql-hive/core'
const logger = new Logger()
const client = createHive({
agent: {
- logger,
},
+ logger,
})
```
**Note**: If both options are provided, the `agent` option is ignored.

View file

@ -1,5 +0,0 @@
---
'hive': patch
---
Expose `Project.createdAt` field via the public GraphQL API.

View file

@ -1,5 +0,0 @@
---
'@graphql-hive/cli': patch
---
Fixes an issue where schema changes containing escaped single-quoted strings were not handled correctly.

View file

@ -1,55 +0,0 @@
---
'@graphql-hive/core': minor
'@graphql-hive/apollo': minor
'@graphql-hive/yoga': minor
---
**Persisted Documents Improvements**
Persisted 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.
```ts
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 `circuitBreaker` configuration.
```ts
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
}
}
})
```

View file

@ -1,7 +0,0 @@
---
'@graphql-hive/cli': minor
'hive': minor
---
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.

View file

@ -1,43 +0,0 @@
---
'@graphql-hive/apollo': minor
---
**Supergraph Manager Improvements**
Persisted 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.
```ts
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.
```ts
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
}
})
```

View file

@ -1,25 +0,0 @@
---
'@graphql-hive/core': minor
---
**New CDN Artifact Fetcher**
We 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.
```ts
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()
```
---
`createSupergraphSDLFetcher` is now deprecated. Please upgrade to use `createCDNArtifactFetcher`.

View file

@ -1,5 +1,24 @@
# hive
## 8.12.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/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](https://github.com/graphql-hive/console/pull/7328)
[`c024ea7`](https://github.com/graphql-hive/console/commit/c024ea7666ee96517b34286d8da35ef20ed89044)
Thanks [@adambenhassen](https://github.com/adambenhassen)! - Expose `Project.createdAt` field via
the public GraphQL API.
## 8.11.0
### Minor Changes

View file

@ -1,6 +1,6 @@
{
"name": "hive",
"version": "8.11.0",
"version": "8.12.0",
"private": true,
"scripts": {
"generate": "tsx generate.ts",

View file

@ -1,5 +1,183 @@
# @graphql-hive/apollo
## 0.45.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add support for providing a logger object via
`HivePluginOptions`.
It is possible to provide the following options:
- **'trace'**
- **'debug'**
- **'info'** default
- **'warn'**
- **'error'**
```ts
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.
```ts
import { createHive } from '@graphql-hive/core'
import { Logger } from '@graphql-hive/logger'
const client = createHive({
logger: new Logger()
})
```
Head to our [Hive Logger documentation](https://the-guild.dev/graphql/hive/docs/logger) to learn
more.
***
**The `HivePluginOptions.debug` option is now deprecated.** Instead, please use the `logger`
option to control logging levels.
```diff
import { createHive } from '@graphql-hive/core'
const client = createHive({
- debug: process.env.DEBUG === "1",
+ logger: process.env.DEBUG === "1" ? "debug" : "info",
})
```
**Note**: If the `logger` property is provided, the `debug` option is ignored.
***
**The `HivePluginOptions.agent.logger` option is now deprecated.** Instead, please provide
`HivePluginOptions.logger`.
```diff
import { createHive } from '@graphql-hive/core'
const logger = new Logger()
const client = createHive({
agent: {
- logger,
},
+ logger,
})
```
**Note**: If both options are provided, the `agent` option is ignored.
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - **Persisted Documents Improvements**
Persisted 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.
```ts
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 `circuitBreaker` configuration.
```ts
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](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - **Supergraph Manager Improvements**
Persisted 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.
```ts
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.
```ts
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`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)]:
- @graphql-hive/core@0.18.0
## 0.42.1
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "@graphql-hive/apollo",
"version": "0.44.0",
"version": "0.45.0",
"type": "module",
"description": "GraphQL Hive + Apollo Server",
"repository": {

View file

@ -1 +1 @@
export const version = '0.44.0';
export const version = '0.45.0';

View file

@ -1,5 +1,30 @@
# @graphql-hive/cli
## 0.56.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/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
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Fixes an issue where schema changes containing
escaped single-quoted strings were not handled correctly.
- Updated dependencies
[[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)]:
- @graphql-hive/core@0.18.0
## 0.55.1
### Patch Changes

View file

@ -81,7 +81,7 @@ DESCRIPTION
```
_See code:
[src/commands/app/create.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/app/create.ts)_
[src/commands/app/create.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/app/create.ts)_
## `hive app:publish`
@ -108,7 +108,7 @@ DESCRIPTION
```
_See code:
[src/commands/app/publish.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/app/publish.ts)_
[src/commands/app/publish.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/app/publish.ts)_
## `hive app:retire`
@ -135,7 +135,7 @@ DESCRIPTION
```
_See code:
[src/commands/app/retire.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/app/retire.ts)_
[src/commands/app/retire.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/app/retire.ts)_
## `hive artifact:fetch`
@ -159,7 +159,7 @@ DESCRIPTION
```
_See code:
[src/commands/artifact/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/artifact/fetch.ts)_
[src/commands/artifact/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/artifact/fetch.ts)_
## `hive dev`
@ -202,7 +202,7 @@ DESCRIPTION
```
_See code:
[src/commands/dev.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/dev.ts)_
[src/commands/dev.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/dev.ts)_
## `hive help [COMMAND]`
@ -246,7 +246,7 @@ DESCRIPTION
```
_See code:
[src/commands/introspect.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/introspect.ts)_
[src/commands/introspect.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/introspect.ts)_
## `hive operations:check FILE`
@ -305,7 +305,7 @@ DESCRIPTION
```
_See code:
[src/commands/operations/check.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/operations/check.ts)_
[src/commands/operations/check.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/operations/check.ts)_
## `hive schema:check FILE`
@ -349,7 +349,7 @@ DESCRIPTION
```
_See code:
[src/commands/schema/check.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/schema/check.ts)_
[src/commands/schema/check.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/schema/check.ts)_
## `hive schema:delete SERVICE`
@ -381,7 +381,7 @@ DESCRIPTION
```
_See code:
[src/commands/schema/delete.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/schema/delete.ts)_
[src/commands/schema/delete.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/schema/delete.ts)_
## `hive schema:fetch [COMMIT]`
@ -414,7 +414,7 @@ DESCRIPTION
```
_See code:
[src/commands/schema/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/schema/fetch.ts)_
[src/commands/schema/fetch.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/schema/fetch.ts)_
## `hive schema:publish FILE`
@ -458,7 +458,7 @@ DESCRIPTION
```
_See code:
[src/commands/schema/publish.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/schema/publish.ts)_
[src/commands/schema/publish.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/schema/publish.ts)_
## `hive update [CHANNEL]`
@ -520,7 +520,7 @@ DESCRIPTION
```
_See code:
[src/commands/whoami.ts](https://github.com/graphql-hive/platform/blob/v0.55.1/src/commands/whoami.ts)_
[src/commands/whoami.ts](https://github.com/graphql-hive/platform/blob/v0.56.0/src/commands/whoami.ts)_
<!-- commandsstop -->

View file

@ -1,6 +1,6 @@
{
"name": "@graphql-hive/cli",
"version": "0.55.1",
"version": "0.56.0",
"description": "A CLI util to manage and control your GraphQL Hive",
"repository": {
"type": "git",

View file

@ -1,5 +1,157 @@
# @graphql-hive/core
## 0.18.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add support for providing a logger object via
`HivePluginOptions`.
It is possible to provide the following options:
- **'trace'**
- **'debug'**
- **'info'** default
- **'warn'**
- **'error'**
```ts
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.
```ts
import { createHive } from '@graphql-hive/core'
import { Logger } from '@graphql-hive/logger'
const client = createHive({
logger: new Logger()
})
```
Head to our [Hive Logger documentation](https://the-guild.dev/graphql/hive/docs/logger) to learn
more.
***
**The `HivePluginOptions.debug` option is now deprecated.** Instead, please use the `logger`
option to control logging levels.
```diff
import { createHive } from '@graphql-hive/core'
const client = createHive({
- debug: process.env.DEBUG === "1",
+ logger: process.env.DEBUG === "1" ? "debug" : "info",
})
```
**Note**: If the `logger` property is provided, the `debug` option is ignored.
***
**The `HivePluginOptions.agent.logger` option is now deprecated.** Instead, please provide
`HivePluginOptions.logger`.
```diff
import { createHive } from '@graphql-hive/core'
const logger = new Logger()
const client = createHive({
agent: {
- logger,
},
+ logger,
})
```
**Note**: If both options are provided, the `agent` option is ignored.
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - **Persisted Documents Improvements**
Persisted 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.
```ts
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 `circuitBreaker` configuration.
```ts
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](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - **New CDN Artifact Fetcher**
We 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.
```ts
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()
```
***
`createSupergraphSDLFetcher` is now deprecated. Please upgrade to use `createCDNArtifactFetcher`.
## 0.15.1
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "@graphql-hive/core",
"version": "0.17.0",
"version": "0.18.0",
"type": "module",
"repository": {
"type": "git",

View file

@ -1 +1 @@
export const version = '0.17.0';
export const version = '0.18.0';

View file

@ -1,5 +1,89 @@
# @graphql-hive/envelop
## 0.40.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add support for providing a logger object via
`HivePluginOptions`.
It is possible to provide the following options:
- **'trace'**
- **'debug'**
- **'info'** default
- **'warn'**
- **'error'**
```ts
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.
```ts
import { createHive } from '@graphql-hive/core'
import { Logger } from '@graphql-hive/logger'
const client = createHive({
logger: new Logger()
})
```
Head to our [Hive Logger documentation](https://the-guild.dev/graphql/hive/docs/logger) to learn
more.
***
**The `HivePluginOptions.debug` option is now deprecated.** Instead, please use the `logger`
option to control logging levels.
```diff
import { createHive } from '@graphql-hive/core'
const client = createHive({
- debug: process.env.DEBUG === "1",
+ logger: process.env.DEBUG === "1" ? "debug" : "info",
})
```
**Note**: If the `logger` property is provided, the `debug` option is ignored.
***
**The `HivePluginOptions.agent.logger` option is now deprecated.** Instead, please provide
`HivePluginOptions.logger`.
```diff
import { createHive } from '@graphql-hive/core'
const logger = new Logger()
const client = createHive({
agent: {
- logger,
},
+ logger,
})
```
**Note**: If both options are provided, the `agent` option is ignored.
### Patch Changes
- Updated dependencies
[[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)]:
- @graphql-hive/core@0.18.0
## 0.38.1
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "@graphql-hive/envelop",
"version": "0.39.1",
"version": "0.40.0",
"type": "module",
"description": "GraphQL Hive + GraphQL Envelop",
"repository": {

View file

@ -1 +1 @@
export const version = '0.39.1';
export const version = '0.40.0';

View file

@ -1,5 +1,141 @@
# @graphql-hive/yoga
## 0.46.0
### Minor Changes
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add support for providing a logger object via
`HivePluginOptions`.
It is possible to provide the following options:
- **'trace'**
- **'debug'**
- **'info'** default
- **'warn'**
- **'error'**
```ts
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.
```ts
import { createHive } from '@graphql-hive/core'
import { Logger } from '@graphql-hive/logger'
const client = createHive({
logger: new Logger()
})
```
Head to our [Hive Logger documentation](https://the-guild.dev/graphql/hive/docs/logger) to learn
more.
***
**The `HivePluginOptions.debug` option is now deprecated.** Instead, please use the `logger`
option to control logging levels.
```diff
import { createHive } from '@graphql-hive/core'
const client = createHive({
- debug: process.env.DEBUG === "1",
+ logger: process.env.DEBUG === "1" ? "debug" : "info",
})
```
**Note**: If the `logger` property is provided, the `debug` option is ignored.
***
**The `HivePluginOptions.agent.logger` option is now deprecated.** Instead, please provide
`HivePluginOptions.logger`.
```diff
import { createHive } from '@graphql-hive/core'
const logger = new Logger()
const client = createHive({
agent: {
- logger,
},
+ logger,
})
```
**Note**: If both options are provided, the `agent` option is ignored.
- [#7346](https://github.com/graphql-hive/console/pull/7346)
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - **Persisted Documents Improvements**
Persisted 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.
```ts
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 `circuitBreaker` configuration.
```ts
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`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d),
[`f266368`](https://github.com/graphql-hive/console/commit/f26636891b8b7e00b9a7823e9d584cedd9dd0f2d)]:
- @graphql-hive/core@0.18.0
## 0.43.1
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "@graphql-hive/yoga",
"version": "0.45.0",
"version": "0.46.0",
"type": "module",
"description": "GraphQL Hive + GraphQL Yoga",
"repository": {

View file

@ -1 +1 @@
export const version = '0.45.0';
export const version = '0.46.0';