@envelop/on-resolve
Changelog for @envelop/on-resolve: every release with its changes and the pull requests behind them.
8.0.0
Major Changes
-
#4574
79b0e8bThanks @egoodwinx! - ### Breaking Changes- Node: minimum supported version is now Node 22. Node 18 and 20 are no longer supported. Future releases will only support Node >=22.
- GraphQL: minimum supported version is now GraphQL 16. GraphQL 14 and 15 are no longer supported.
- Request body parsing: Yoga now limits request bodies to 25,000,000 bytes by default.
Enforcing this limit streams the body through a byte counter, making POST body parsing
asynchronous even for an in-memory body. As a result,
yoga.fetch()can return a Promise where it previously returned a synchronous Response, even when all resolvers and plugins are synchronous.
Migration
- If you’re on Node 18/20, upgrade to Node 22 or later before upgrading this package.
- If you’re on graphql 14/15, upgrade to graphql 16 or 17 first.
- Await
yoga.fetch()and response body parsing instead of relying on synchronous results. SetmaxRequestBodySize: falseincreateYogato disable the body-size limit and preserve synchronous parsing for in-memory bodies, but only if you enforce an appropriate request-body limit elsewhere.
-
#4574
79b0e8bThanks @egoodwinx! - ### Dependencies- Bump
@whatwg-node/serverto^0.13.0,@whatwg-node/fetchto^0.12.0, and@whatwg-node/promise-helpersto^2.0.0. - Delegate to @whatwg-node/server’s useLimitRequestBodySize instead of a hand-rolled byte counter,
and swap in the native TransformStream when the incoming request already has a native
ReadableStream body — piping it through the ponyfill TransformStream throws since they’re
different realms. Thread an optional
fetchAPIparam through handle/parseRequest/ getResultForParams so callers can override which fetchAPI (native vs ponyfill) the rest of the pipeline uses. - Unread request bodies are discarded after the response is decided (keep-alive friendly).
- Incoming global
Requestinstances automatically use the native Fetch API (pickRightFetchAPI), so Next.js no longer needsfetchAPI: { Response }.
Breaking Changes
engines.nodeis now>=22.15.0(aligned with whatwg-node 0.12+/0.13).@envelop/coreno longer exportsmapMaybePromise(removed upstream in@whatwg-node/promise-helpersv2). UsehandleMaybePromise(() => value, ...)instead.@whatwg-node/fetchno longer exportscrypto; use the platformcryptoglobal.TextEncoderstill comes fromfetchAPIwhere hashing goes through Yoga’s FetchAPI.
- Bump
Patch Changes
7.2.1
Patch Changes
-
#4577
7bff35cThanks @egoodwinx! - Add homepage and bugs.url to package.json files -
Updated dependencies [
7bff35c]:- @envelop/core@5.6.1
7.2.0
Minor Changes
-
#4545
94ebe5bThanks @egoodwinx! - Update to support graphql-js 17Bump package versions, fix expected typing, and update compatability with subscribe.
Patch Changes
- Updated dependencies
[
94ebe5b]:- @envelop/core@5.6.0
7.1.1
Patch Changes
- Updated dependencies
[
0bfde27]:- @envelop/core@5.5.1
7.1.0
Minor Changes
-
#2747
49346b2Thanks @cecchi! - Add option to ignore default resolvers in opentelemetry instrumentationTo reduce telemetry data volume and noise in traces, it is recommended to ignore resolvers with the default implementation since they probably doesn’t do anything worth tracking.
Usage
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql' import { envelop, useEngine } from '@envelop/core' import { useOpenTelemetry } from '@envelop/opentelemetry' const getEnveloped = envelop({ plugins: [ useEngine({ parse, validate, specifiedRules, execute, subscribe }), // ... other plugins ... useOpenTelemetry({ resolvers: true, defaultResolvers: false // explicitly disable default resolvers tracing. Defaults to `true` }) ] })
Patch Changes
- Updated dependencies
[
d3d83bc]:- @envelop/core@5.5.0
7.0.0
Patch Changes
- Updated dependencies
[
0434fbd]:- @envelop/core@5.4.0
6.0.0
Patch Changes
- Updated dependencies
[
3ebaa3b]:- @envelop/core@5.3.0
5.1.3
Patch Changes
5.1.2
Patch Changes
5.1.1
Patch Changes
5.1.0
Patch Changes
5.0.1
Patch Changes
- #2455
5b6a166Thanks @ardatan! - dependencies updates:- Added dependency
@whatwg-node/promise-helpers@^1.0.0↗︎ (todependencies)
- Added dependency
- Updated dependencies
[
5b6a166]:- @envelop/core@5.1.1
5.0.0
Patch Changes
- Updated dependencies
[
9bd1b20]:- @envelop/core@5.1.0
4.1.1
Patch Changes
-
#2292
c3dd2c3Thanks @ardatan! - Refactor the plugin to avoid extra promises with `mapMaybePromise` -
Updated dependencies [
c3dd2c3]:- @envelop/core@5.0.2
4.1.0
Minor Changes
- #1982
408f5be3Thanks @darren-west! - Option to skip executing theonResolvehook during introspection queries
4.0.0
Major Changes
-
#1986
68e7a2a5Thanks @EmrysMyrddin! - Breaking Change: Support of Node 16 is dropped. -
Updated dependencies [
68e7a2a5,f7ef03c0]:- @envelop/core@5.0.0
3.0.3
Patch Changes
-
#1927
e3c90116Thanks @renovate! - dependencies updates:- Updated dependency
@envelop/core@^4.0.2↗︎ (from^4.0.1, inpeerDependencies)
- Updated dependency
-
Updated dependencies [
dee6b8d2]:- @envelop/core@4.0.3
3.0.2
Patch Changes
- Updated dependencies
[
db20864a]:- @envelop/core@4.0.2
3.0.1
Patch Changes
- Updated dependencies []:
- @envelop/core@4.0.1
3.0.0
Major Changes
-
#1776
332f1f22Thanks @ardatan! - Drop Node 14 and require Node 16 or higher -
Updated dependencies [
332f1f22,a36925c7]:- @envelop/core@4.0.0
Patch Changes
- #1773
7066ce98Thanks @jonapgar-groupby! - Prevent re-wrapping field resolvers with useOnResolve plugin. Fixes #1773
2.0.6
Patch Changes
- Updated dependencies
[
c1eb2c09]:- @envelop/core@3.0.6
2.0.5
Patch Changes
- Updated dependencies
[
270249cf]:- @envelop/core@3.0.5
2.0.4
Patch Changes
- Updated dependencies []:
- @envelop/core@3.0.4
2.0.3
Patch Changes
- Updated dependencies
[
6b48ef96]:- @envelop/core@3.0.3
2.0.2
Patch Changes
- Updated dependencies
[
22f5ccfb]:- @envelop/core@3.0.2
2.0.0
Major Changes
-
#1487
dc1e24b5Thanks @saihaj! - RemoveonResolverCalledWe decided to drop onResolverCalled hook and instead provide a new plugin that will let you hook into this phase.
import { parse, validate, execute, subscribe } from 'graphql' import { envelop, Plugin, useEngine } from '@envelop/core' + import { useOnResolve } from '@envelop/on-resolve' import { onResolverCalled } from './my-resolver' function useResolve(): Plugin { return { - onResolverCalled: onResolverCalled, + onPluginInit: ({ addPlugin }) => { + addPlugin(useOnResolve(onResolverCalled)) + }, } } const getEnveloped = envelop({ plugins: [ useEngine({ parse, validate, execute, subscribe }), // ... other plugins ... useResolve(), ], }); -
Updated dependencies [
dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5,dc1e24b5]:- @envelop/core@3.0.0