Releases: n1ru4l/envelop
January 27, 2025
@envelop/[email protected]
Minor Changes
@envelop/[email protected]
Patch Changes
- Updated dependencies
[7882ffb
]:- @envelop/[email protected]
January 16, 2025
@envelop/[email protected]
Patch Changes
- #1384
ed8c444
Thanks @renovate! - dependencies updates:- Removed dependency
@apollo/gateway@^0.54.0
↗︎ (from
peerDependencies
)
- Removed dependency
@envelop/[email protected]
Patch Changes
- #1384
ed8c444
Thanks @renovate! - dependencies updates:- Updated dependency
ioredis@^5.4.2
↗︎ (from
^4.27.9
, independencies
)
- Updated dependency
January 13, 2025
@envelop/[email protected]
Patch Changes
December 12, 2024
@envelop/[email protected]
Major Changes
-
#2323
2993773
Thanks @Karibash! - Make it possible to get the active span in the
GraphQL resolverBreaking Change: With this change, this plugin now wraps the execute function. This plugin
should be placed last so that the execute function is not overwritten by another plugin.const yoga = createYoga({ plugins: [ ...otherPlugins, useSentry({ // ... }) ] })
December 11, 2024
@envelop/[email protected]
Patch Changes
-
#2347
8b7e657
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-tools/executor@^1.3.6
↗︎
(todependencies
)
- Added dependency
-
#2347
8b7e657
Thanks @ardatan! - Handle operations with `@include` and `@skip`
correctly when they have default values in the operation definition{ query: /* GraphQL */ ` query MyQuery($include: Boolean = true) { field @include(if: $include) } `, variables: {} }
should be considered same as
{ query: /* GraphQL */ ` query MyQuery($include: Boolean!) { field @include(if: $include) } `, variables: { include: true } }
@envelop/[email protected]
Patch Changes
- #2337
931a6da
Thanks @renovate! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.10.0
↗︎
(from^0.9.0
, independencies
)
- Updated dependency
@envelop/[email protected]
Major Changes
-
#2335
073774c
Thanks @EmrysMyrddin! - Fix: Update code to better feat the new
Sentry v8 APIBreaking Change:
startTransaction
option has been removed.forceTransaction
option has been added, disabled by default.
@envelop/[email protected]
Patch Changes
- #1709
e6aac57
Thanks @renovate! - dependencies updates:- Updated dependency
hot-shots@^10.0.0
↗︎
(from^8.0.0 || ^9.0.0
, inpeerDependencies
)
- Updated dependency
November 26, 2024
@envelop/[email protected]
Minor Changes
-
#2326
443fc15
Thanks @EmrysMyrddin! - Allow to explicitly control which
events and timing should be observe.Each metric can now be configured to observe events and timings only for certain GraphQL pipeline
phases, or depending on the request context.Example: trace only execution and subscription errors
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql' import { envelop, useEngine } from '@envelop/core' import { usePrometheus } from '@envelop/prometheus' const TRACKED_OPERATION_NAMES = [ // make a list of operation that you want to monitor ] const getEnveloped = envelop({ plugins: [ useEngine({ parse, validate, specifiedRules, execute, subscribe }), usePrometheus({ metrics: { // Here, an array of phases can be provided to enable the metric only on certain phases. // In this example, only error happening during the execute and subscribe phases will tracked graphql_envelop_phase_error: ['execute', 'subscribe'] } }) ] })
Example: Monitor timing only of a set of operations by name
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql' import { envelop, useEngine } from '@envelop/core' import { usePrometheus } from '@envelop/prometheus' const TRACKED_OPERATION_NAMES = [ // make a list of operation that you want to monitor ] const getEnveloped = envelop({ plugins: [ useEngine({ parse, validate, specifiedRules, execute, subscribe }), usePrometheus({ metrics: { graphql_yoga_http_duration: createHistogram({ registry, histogram: { name: 'graphql_envelop_request_duration', help: 'Time spent on HTTP connection', labelNames: ['operationName'] }, fillLabelsFn: ({ operationName }, _rawContext) => ({ operationName }), phases: ['execute', 'subscribe'], // Here `shouldObserve` control if the request timing should be observed, based on context shouldObserve: ({ operationName }) => TRACKED_OPERATIONS.includes(operationName) }) } }) ] })
Default Behavior Change
A metric is enabled using
true
value in metrics options will observe in every phases available.Previously, which phase was observe was depending on which other metric were enabled. For example,
this config would only trace validation error:usePrometheus({ metrics: { graphql_envelop_phase_error: true, graphql_envelop_phase_validate: true } })
This is no longer the case. If you were relying on this behavior, please use an array of string to
restrict observed phases.usePrometheus({ metrics: { graphql_envelop_phase_error: ['validate'] } })
November 20, 2024
@envelop/[email protected]
Patch Changes
- #2327
b7dc96a
Thanks @renovate! - dependencies updates:- Updated dependency
[email protected]
↗︎
(from0.8.6
, independencies
)
- Updated dependency
@envelop/[email protected]
Patch Changes
-
#2330
b1210bc
Thanks @enisdenjo! - dependencies updates:- Added dependency
graphql-middleware@^6.1.35
↗︎
(todependencies
)
- Added dependency
-
#2330
b1210bc
Thanks @enisdenjo! - Add graphql-middleware as a dependency
October 10, 2024
@envelop/[email protected]
Patch Changes
October 09, 2024
October 09, 2024
@envelop/[email protected]
Major Changes
-
#2277
9f65fcb
Thanks @trixobird! - dependencies updates:- Updated dependency
@sentry/node@^8.0.0
↗︎ (from
^6 || ^7
, inpeerDependencies
)
- Updated dependency
@envelop/[email protected]
Patch Changes
- #2309
4fd5917
Thanks @n1ru4l! - Strip__responseCacheId
and
__responseCacheTypeName
from incremental delivery execution result.
@envelop/[email protected]
Major Changes
-
#2277
9f65fcb
Thanks @trixobird! - dependencies updates:- Updated dependency
@sentry/node@^8.0.0
↗︎ (from
^6 || ^7
, inpeerDependencies
)
- Updated dependency