On this page

@envelop/testing

Changelog for @envelop/testing: every release with its changes and the pull requests behind them.

11.0.0

Major Changes

  • #4574 79b0e8b Thanks @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. 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

    • Bump @graphql-tools/utils to ^13.1.1, @graphql-tools/schema to ^11.0.0, and @graphql-tools/executor to ^4.1.2.

    Incremental delivery

    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.

    Breaking Changes

    • 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.
    • Yoga no longer re-exports helpers that already live upstream:
      • getSchemaCoordinate -> @graphql-tools/utils
      • mergeSchemas -> @graphql-tools/schema
      • DisposableSymbols -> @whatwg-node/server
      • mapAsyncIterator / isPromise / fakePromise / handleMaybePromise / MaybePromise -> @whatwg-node/promise-helpers
    • @envelop/core utils no longer re-exports mapAsyncIterator or isPromise. Import from @whatwg-node/promise-helpers.
    • Use asGetArgumentValuesVariables / coerceGetVariableValuesResult from @graphql-tools/utils for GraphQL 16/17 VariableValues compatibility.

    Migration

    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')

Patch Changes

10.2.3

Patch Changes

10.2.2

Patch Changes

10.2.1

Patch Changes

  • #4577 7bff35c Thanks @egoodwinx! - Add homepage and bugs.url to package.json files

  • Updated dependencies [7bff35c]:

    • @envelop/types@5.2.2
    • @envelop/core@5.6.1

10.2.0

Minor Changes

  • #4545 94ebe5b Thanks @egoodwinx! - Update to support graphql-js 17

    Bump package versions, fix expected typing, and update compatability with subscribe.

Patch Changes

  • Updated dependencies [94ebe5b]:
    • @envelop/core@5.6.0

10.1.1

Patch Changes

  • Updated dependencies [0bfde27]:
    • @envelop/core@5.5.1

10.1.0

Patch Changes

10.0.0

Patch Changes

  • Updated dependencies [0434fbd]:
    • @envelop/core@5.4.0

9.0.0

Patch Changes

  • Updated dependencies [3ebaa3b]:
    • @envelop/core@5.3.0

8.1.3

Patch Changes

  • Updated dependencies [914f9ed, 914f9ed]:
    • @envelop/core@5.2.3
    • @envelop/types@5.2.1

8.1.2

Patch Changes

8.1.1

Patch Changes

8.1.0

Patch Changes

  • Updated dependencies [a107c89, a107c89]:
    • @envelop/core@5.2.0
    • @envelop/types@5.2.0

8.0.1

Patch Changes

  • Updated dependencies [5b6a166, 5b6a166]:
    • @envelop/core@5.1.1
    • @envelop/types@5.1.1

8.0.0

Patch Changes

  • Updated dependencies [9bd1b20]:
    • @envelop/types@5.1.0
    • @envelop/core@5.1.0

7.0.0

Major Changes

6.0.3

Patch Changes

6.0.2

Patch Changes

6.0.1

Patch Changes

  • Updated dependencies [834e1e39]:
    • @envelop/types@4.0.1
    • @envelop/core@4.0.1

6.0.0

Major Changes

Patch Changes

  • #1776 332f1f22 Thanks @ardatan! - dependencies updates:

  • #1728 a36925c7 Thanks @ardatan! - - Memoize parsed document string result and use it wherever possible, and export getDocumentString function to allow users to use it as well.

    • Use WeakMaps with DocumentNode wherever possible instead of using LRU Cache with strings. It is more optimal if a parser caching is used

5.0.6

Patch Changes

5.0.5

Patch Changes

  • Updated dependencies [270249cf]:
    • @envelop/core@3.0.5

5.0.4

Patch Changes

  • Updated dependencies [e2ff77ed]:
    • @envelop/types@3.0.1
    • @envelop/core@3.0.4

5.0.3

Patch Changes

  • Updated dependencies [6b48ef96]:
    • @envelop/core@3.0.3

5.0.2

Patch Changes

  • Updated dependencies [22f5ccfb]:
    • @envelop/core@3.0.2

5.0.0

Major Changes

4.6.0

Minor Changes

  • #1499 1f7af02b Thanks @viniciuspalma! - Adding tslib to package dependencies

    Projects that currently are using yarn Berry with PnP or any strict dependency resolver, that requires that all dependencies are specified on package.json otherwise it would endue in an error if not treated correct

    Since https://www.typescriptlang.org/tsconfig#importHelpers is currently being used, tslib should be exported as a dependency to external runners get the proper import.

    Change on each package:

    // package.json
    {
      "dependencies": {
        "tslib": "^2.4.0"
      }
    }
  • Updated dependencies [1f7af02b, ae7bc9a3]:

    • @envelop/core@2.6.0
    • @envelop/types@2.4.0

4.5.0

Minor Changes

4.4.2

Patch Changes

  • 071f946: Fix CommonJS TypeScript resolution with moduleResolution node16 or nodenext
  • Updated dependencies [071f946]
    • @envelop/core@2.4.2
    • @envelop/types@2.3.1

4.4.1

Patch Changes

  • Updated dependencies [787d28a2]
    • @envelop/core@2.4.1

4.4.0

Minor Changes

  • 8bb2738: Support TypeScript module resolution.
  • Updated dependencies [8bb2738]
    • @envelop/core@2.4.0
    • @envelop/types@2.3.0

4.3.3

Patch Changes

  • fbf6155: update package.json repository links to point to the new home
  • Updated dependencies [fbf6155]
    • @envelop/core@2.3.3
    • @envelop/types@2.2.1

4.3.2

Patch Changes

  • Updated dependencies [07d029b]
    • @envelop/core@2.3.2

4.3.1

Patch Changes

  • Updated dependencies [d5c2c9a]
    • @envelop/core@2.3.1

4.3.0

Minor Changes

  • Updated dependencies [af23408]
    • @envelop/core@2.3.0
    • @envelop/types@2.2.0

4.2.0

Minor Changes

  • Updated dependencies [ada7fb0]
  • Updated dependencies [d5115b4]
  • Updated dependencies [d5115b4]
    • @envelop/core@2.2.0
    • @envelop/types@2.1.0

4.1.0

Minor Changes

  • Updated dependencies [78b3db2]
  • Updated dependencies [f5eb436]
    • @envelop/core@2.1.0

4.0.0

Patch Changes

  • Updated dependencies [4106e08]
  • Updated dependencies [aac65ef]
  • Updated dependencies [4106e08]
    • @envelop/core@2.0.0
    • @envelop/types@2.0.0

3.0.1

Patch Changes

  • 3dfddb5: Bump graphql-tools/utils to v8.6.1 to address a bug in getArgumentsValues
  • Updated dependencies [3dfddb5]
    • @envelop/core@1.7.1

3.0.0

Patch Changes

  • Updated dependencies [d9cfb7c]
    • @envelop/core@1.7.0

2.1.1

Patch Changes

  • b1a0331: Properly list @envelop/core as a peerDependency in plugins.

    This resolves issues where the bundled envelop plugins published to npm had logic inlined from the @envelop/core package, causing instanceof check of EnvelopError to fail.

  • Updated dependencies [b1a0331]

    • @envelop/core@1.6.1
    • @envelop/types@1.5.1

2.1.0

Minor Changes

  • 04120de: add support for GraphQL.js 16

2.0.0

Patch Changes

  • Updated dependencies [d65e35d]
  • Updated dependencies [26475c9]
    • @envelop/core@1.3.0
    • @envelop/types@1.2.0

1.1.1

Patch Changes

  • 7704fc3: Do not swallow/map errors thrown from contextFactory

1.1.0

Minor Changes

  • 94d8243: Improved testking and allow mocking/overriding of phases and plugins

1.0.3

Patch Changes

  • 452af8f: Update dependencies of graphql-tools to latest

1.0.2

Patch Changes

  • 94db02d: Update usage of plugins to use the correct isAsyncIterable and new helper handleStreamOrSingleExecutionResult

1.0.1

Patch Changes

  • 8021229: fix ESM graphql import

1.0.0

Major Changes

  • 40bc444: v1 major release for envelop packages

0.0.1

Patch Changes

  • bcbaccb: Fix issues with incorrect types generated in d.ts
  • bcbaccb: Initial release for @envelop/testing package