Skip to Content
GraphQL Modules

Changelog

3.1.2

Patch Changes

  • #2607 3274c04 Thanks @renovate! - dependencies updates:

  • #2626 68c2cb4 Thanks @renovate! - dependencies updates:

  • #2642 dac3288 Thanks @renovate! - dependencies updates:

  • #2681 8ed0406 Thanks @dotansimha! - Fix memory leak: per-operation context was retained forever when any long-lived async resource (a global setTimeout/setInterval, a telemetry exporter, undici’s module-scoped timer, …) snapshotted the current AsyncContextFrame during execution. Since nodejs/node#48528, every async resource scheduled inside an AsyncLocalStorage.run(...) captures a kAsyncContextFrame snapshot, and the value stored in our internal AsyncLocalStorage was a pair of closures that captured context — so the snapshot pinned the entire operation context (potentially multiple MBs).

    The fix routes every per-operation reference to context through a mutable holder (refs.context / refs.appContext). sharedContext (exposed as env.context) and the cached CONTEXT injector value are now getter-based views over refs.context instead of shallow spreads, so they hold no user data of their own. ɵdestroy only nulls the holder slots — public-facing identities (env.context, ɵinjector) stay intact and continue to work, but the heavy user payload becomes unreachable from the (still-pinned) closure scope.

  • #2681 8ed0406 Thanks @dotansimha! - Fix @ExecutionContext() leaking across concurrent controller-backed operations: in createExecution/createSubscription the controller branch called perform(options.controller) directly, skipping runWithContext, so reads after an await fell through to the shared appInjector getter and resolved to the most recently created operation’s context.

    The controller now exposes its runWithContext as ɵrunWithContext and both execution paths wrap perform in it, giving controller-backed executions the same per-operation ALS isolation the non-controller path already had.

3.1.1

Patch Changes

3.1.0

Minor Changes

  • #2618 55518d0 Thanks @vlad-x! - Enabled support for resolver extensions for compatibility with such libraries as grafast or graphql-query-complexity

3.0.0

Major Changes

  • #2563 f40de70 Thanks @kamilkisiela! - BREAKING Providers of each module are now resolved of upon application creation.

    This makes Dependency Injection less strict and not dependent on the order of module imports (hello circular imports).

    BREAKING Removed providers, operationProviders and singletonProviders from the Module interface (unlikely you were using them).

Patch Changes

2.4.1

Patch Changes

2.4.0

Minor Changes

2.3.0

Minor Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

Patch Changes

2.1.2

Patch Changes

2.1.1

Patch Changes

2.1.0

Minor Changes

  • c0a3d556: Allow to overwrite providers when using testkit.testModule

Patch Changes

  • 9e5ec3ae: Add a deprecation note for createSchemaForApollo method
  • 285987c6: Fix a memory leak related to ExecutionContext and Promises

2.0.0

Major Changes

Minor Changes

  • 75552e67: feat: GraphQL v16 support
  • c084f1e4: ESM support

1.4.4

Patch Changes

  • 9ec7fa0c: Fix the failure of missing session when multi-mutation operation

1.4.3

Patch Changes

  • e206539c: Use correct __resolveObject signature
  • 648d81fe: Adds a validation of typeDefs to be DocumentNodes

1.4.2

Patch Changes

  • f8e6e15: Fix missing ApolloServer cacheControl in GraphQLResolveInfo

1.4.1

Patch Changes

  • fefca5d: Fix race condition between Inject and Injectable

1.4.0

Minor Changes

  • 499c81a: Support __resolveObject
  • 499c81a: Manual control of GraphQL operation

1.3.0

Minor Changes

  • f138e08: Support __resolverReference resolver for federation

1.2.1

Patch Changes

  • 9a59787: Allow inheritance of resolvers defined in interfaces

1.2.0

Minor Changes

  • f38ff90: Introduce testkit.mockApplication
  • f38ff90: Custom GraphQLSchema builder
  • f38ff90: Introduce testkit.mockModule

1.1.0

Minor Changes

  • 8db9f91: Testing utilities

1.0.0

Complete rewrite of GraphQL Modules based on lessons learned from using and maintaining v0 releases. The “Introduction to GraphQL Modules” page will help you understand the new version.

For migration guide, please check “Migration from v0.X” chapter in docs.