graphql-modules@3.1.2
Patch Changes
-
#2607
3274c04Thanks @renovate! - dependencies updates:- Updated dependency
ramda@^0.31.0↗︎ (from^0.30.0, independencies)
- Updated dependency
-
#2626
68c2cb4Thanks @renovate! - dependencies updates:- Updated dependency
@graphql-tools/wrap@^11.0.0↗︎ (from^10.0.0, independencies)
- Updated dependency
-
#2642
dac3288Thanks @renovate! - dependencies updates:- Updated dependency
ramda@^0.32.0↗︎ (from^0.31.0, independencies)
- Updated dependency
-
#2681
8ed0406Thanks @dotansimha! - Fix memory leak: per-operationcontextwas retained forever when any long-lived async resource (a globalsetTimeout/setInterval, a telemetry exporter, undici's module-scoped timer, …) snapshotted the currentAsyncContextFrameduring execution. Since nodejs/node#48528, every async resource scheduled inside anAsyncLocalStorage.run(...)captures akAsyncContextFramesnapshot, and the value stored in our internalAsyncLocalStoragewas a pair of closures that capturedcontext— so the snapshot pinned the entire operation context (potentially multiple MBs).The fix routes every per-operation reference to
contextthrough a mutable holder (refs.context/refs.appContext).sharedContext(exposed asenv.context) and the cachedCONTEXTinjector value are now getter-based views overrefs.contextinstead of shallow spreads, so they hold no user data of their own.ɵdestroyonly 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
8ed0406Thanks @dotansimha! - Fix@ExecutionContext()leaking across concurrent controller-backed operations: increateExecution/createSubscriptionthe controller branch calledperform(options.controller)directly, skippingrunWithContext, so reads after anawaitfell through to the sharedappInjectorgetter and resolved to the most recently created operation's context.The controller now exposes its
runWithContextasɵrunWithContextand both execution paths wrapperformin it, giving controller-backed executions the same per-operation ALS isolation the non-controller path already had.