NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #3587 most downloaded on npm
Latest stable
6.0.0
Last release 1 months ago
22 Oct 2026
Ships unpredictably
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
1827 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
d65e35d: add enableIf utility to enable plugins conditionally
Your coding agent can read these notes before it upgrades. Set up the MCP server →
eb0a4bd: Adds a custom message option used when masking errors
8bb2738: Support TypeScript module resolution.
38e9f1b
Thanks @egoodwinx! - dependencies updates:
@whatwg-node/promise-helpers@^2.0.2 ↗︎
(from ^2.0.0, in dependencies)38e9f1b,
045fc2f,
38e9f1b,
cfd0092,
35501fe,
807c7af]:
7704fc3: Add API for registering a context creation error handler.
export const useMyHook = (): Plugin => {
return {
onPluginInit(context) {
context.registerContextErrorHandler(({ error, setError }) => {
console.error('Error occurred during context creation.', error)
setError(new Error('Something went wrong :('))
})
}
}
}
7704fc3: useMaskedErrors now masks errors thrown during context creation (calling
contextFactory).
It might be possible that you need to load some data during context creation from a remote source
that could be unavailable and thus yield in an error being thrown. useMaskedErrors now handles
such scenarios and prevents leaking such information to clients.
✅ context error will be masked
const getEnveloped = envelop({
plugins: [
useExtendContext(() => {
throw new Error('Oooooops.')
}),
useMaskedErrors()
]
})
7704fc3: useMaskedErrors now also handles errors that are occurring during subscriptions.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
`ts // deprecated (removed in GraphQL.js 16) execute(schema, ...args) // how it should be done execute({ schema, ...args }) `
35c85a7: ensure legacy graphql execute parameters are passed properly.
// deprecated (removed in GraphQL.js 16)
execute(schema, ...args)
// how it should be done
execute({ schema, ...args })
This fixes an edge-case with graphql frameworks that call execute with the old and deprecated signature.
Thus, Envelop allows developers using server frameworks that hard-core the legacy v15 call signature to immediately use v16 without waiting for framework developers to adjusting it or fork/patch it.
Nothing published for this version
452af8f: Update dependencies of graphql-tools to latest
071f946: Fix CommonJS TypeScript resolution with moduleResolution node16 or nodenext
moduleResolution node16 or nodenexthandleStreamOrSingleExecutionResultisAsyncIterable and new helper
handleStreamOrSingleExecutionResultNothing published for this version
### Patch Changes - Updated dependencies [07d029b] - @envelop/core@2.3.2
d73f61c]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
29fab6e: Introduce useApolloDataSources
#4574
79b0e8b
Thanks @egoodwinx! - ### Breaking Changes
yoga.fetch() can return a Promise where
it previously returned a synchronous Response, even when all resolvers and plugins are
synchronous.yoga.fetch() and response body parsing instead of relying on synchronous results. Set
maxRequestBodySize: false in createYoga to disable the body-size limit and preserve
synchronous parsing for in-memory bodies, but only if you enforce an appropriate request-body
limit elsewhere.#4623
be89d05
Thanks @ardatan! - ### Dependencies
@graphql-tools/utils to ^13.1.1, @graphql-tools/schema to ^11.0.0, and
@graphql-tools/executor to ^4.1.2.Yoga maps the GraphQL HTTP Accept header through INCREMENTAL_DELIVERY_SPECS from
@graphql-tools/utils onto executor incrementalSpec. multipart/mixed;incrementalSpec=v0.2
runs the v0.2 payload format and echoes that spec on Content-Type.
multipart/mixed;deferSpec=20220824 or bare multipart/mixed stays on v0.1. An unsupported
incremental spec yields 406.
A later incremental spec is a graphql-tools table row plus an executor publisher. Yoga, Hive
Gateway, and HTTP executors pick it up by bumping @graphql-tools/utils /
@graphql-tools/executor.
createGraphQLError is removed. Use new GraphQLError(message, options) from graphql. To
attach Yoga's experimental schema coordinate, use withSchemaCoordinate(error, coordinate) and
read with getSchemaCoordinate from @graphql-tools/utils.mapMaybePromise is removed (was exported from Yoga / @envelop/core). Use
handleMaybePromise from @whatwg-node/promise-helpers.getSchemaCoordinate -> @graphql-tools/utilsmergeSchemas -> @graphql-tools/schemaDisposableSymbols -> @whatwg-node/servermapAsyncIterator / isPromise / fakePromise / handleMaybePromise / MaybePromise ->
@whatwg-node/promise-helpers@envelop/core utils no longer re-exports mapAsyncIterator or isPromise. Import from
@whatwg-node/promise-helpers.asGetArgumentValuesVariables / coerceGetVariableValuesResult from @graphql-tools/utils
for GraphQL 16/17 VariableValues compatibility.import { GraphQLError } from 'graphql'
import { withSchemaCoordinate } from 'graphql-yoga'
import { mergeSchemas } from '@graphql-tools/schema'
import { getSchemaCoordinate } from '@graphql-tools/utils'
import { handleMaybePromise, isPromise, type MaybePromise } from '@whatwg-node/promise-helpers'
import { DisposableSymbols } from '@whatwg-node/server'
throw withSchemaCoordinate(new GraphQLError('not found'), 'Query.user')
#4574
79b0e8b
Thanks @egoodwinx! - ### Breaking Changes
yoga.fetch() can return a Promise where
it previously returned a synchronous Response, even when all resolvers and plugins are
synchronous.yoga.fetch() and response body parsing instead of relying on synchronous results. Set
maxRequestBodySize: false in createYoga to disable the body-size limit and preserve
synchronous parsing for in-memory bodies, but only if you enforce an appropriate request-body
limit elsewhere.#4575
862447a
Thanks @egoodwinx! - Use
@graphql-hive/logger and add correlated, per-request
logging (closes #4048)
Every request now gets its own logger, available as context.log (and serverContext.log in
plugin hooks), tagged with a requestId. Everything logged while handling a request can be
correlated by that id.
The request id is taken from the host integration if it already assigned one (e.g. Fastify's
request.id), otherwise from the incoming x-request-id header, otherwise generated. It is also
sent back in the x-request-id response header. Configure it with the new requestId option:
createYoga({
requestId: {
// don't trust the incoming header, recommended when clients can reach the server directly
trustHeader: false,
headerName: 'x-correlation-id',
generateRequestId: () => myId()
}
})
Pass requestId: false to disable it.
At the info level, a single "Request processed" line is logged per request with the method,
path, operation name and type, response status, error count and duration. At the debug level,
more details about request processing are logged.
Masked errors are now logged with the request's logger, so they can be traced back to the request
that caused them. Custom maskError functions receive the request's context as an optional fourth
argument.
The @envelop/newrelic, @envelop/auth0, @envelop/resource-limitations, @envelop/statsd,
@envelop/graphql-jit, @envelop/response-cache and @envelop/response-cache-cloudflare-kv
plugins accept a new log option for their own messages, instead of always writing to the
console.
@envelop/response-cache's shouldCacheResult now also receives the GraphQL context.
@graphql-yoga/logger package has been removed. graphql-yoga re-exports Logger,
MemoryLogWriter and LogLevel from @graphql-hive/logger instead.createLogger and the YogaLogger type are no longer exported. Use new Logger(options)
instead.logging option now takes boolean | Logger | LogLevel, where Logger is the one from
@graphql-hive/logger.yoga.logger has been renamed to yoga.log.logger option of useGraphiQL and useHealthCheck has been removed. They now log through
the request's logger.@graphql-yoga/nestjs now logs through Nest's Logger by default instead of not logging at
all. Pass logging: false to keep the previous behaviour. logging: true on Fastify no longer
logs through Fastify's logger, pass it explicitly instead (see below).@envelop/apollo-federation, @envelop/auth0, @envelop/graphql-jit, @envelop/newrelic,
@envelop/resource-limitations, @envelop/response-cache,
@envelop/response-cache-cloudflare-kv and @envelop/statsd now have a peer dependency on
@graphql-hive/logger that you must install.@envelop/apollo-federation's logger option now expects a Logger from
@graphql-hive/logger and defaults to new Logger() instead of console.Create loggers with Logger:
- import { createLogger } from 'graphql-yoga';
+ import { Logger } from 'graphql-yoga';
createYoga({
- logging: createLogger('debug'),
+ logging: new Logger({ level: 'debug' }),
});
Use log instead of logger on the Yoga instance:
const plugin = {
onYogaInit({ yoga }) {
- yoga.logger.info('ready');
+ yoga.log.info('ready');
},
};
Prefer the request-scoped logger inside resolvers and plugin hooks so the logs carry the request id:
const resolvers = {
Query: {
hello: (_, __, context) => {
context.log.debug('resolving hello')
return 'world'
}
}
}
If you use any of the @envelop/* plugins listed above, install the logger:
npm i @graphql-hive/logger
If you depended on @graphql-yoga/logger directly, switch to @graphql-hive/logger:
- import { Logger } from '@graphql-yoga/logger';
+ import { Logger } from '@graphql-hive/logger';
To keep logging through Fastify's logger in @graphql-yoga/nestjs:
import { Logger } from 'graphql-yoga'
import { PinoLogWriter } from '@graphql-hive/logger/writers/pino'
// in your yoga driver options
logging: new Logger({ writers: [new PinoLogWriter(app.log)] })
Updated dependencies
[862447a,
79b0e8b,
be89d05,
5334079,
79b0e8b]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
bcbaccb: Fix issues with incorrect types generated in d.ts
Nothing published for this version
932f6a8: Better type-safety for hooks
Nothing published for this version
8bb2738: Support TypeScript module resolution.
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - @envelop/response-cache@2.3.0
skipIntrospection for useLogger pluginNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
7f4901d: Fix issues with contextFactory and missing context coming from GraphQL pipeline orchestrator
Nothing published for this version
Nothing published for this version
a5bee94: \* Allow access to context in all phases
getEnveloped function and allow to pass initial context thereNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.