Packages

@graphql-tools/batch-execute

10.3.2 · 9 Nov 2026MIT15.5M / weekRepositorynpmAtom feed

Your version

9.0.8

2 Dec 2024Where it was published

9.0.19 is the newest release of 9.x.

In short

1 fixed

Release note

The section about @graphql-tools/batch-execute of a note shared by several packages.

Patch Changes

  • Fix the issue that batched query generation when optional variables are not prefixed and sent correctly.

    See the use case below;

    When two batched queries are sent like below;

    query TestOne($someOptionalVar: String) {
      foo(someOptionalArg: $someOptionalVar) {
        id
        name
      }
    }
    query TestTwo($someOptionalVar: String) {
      foo(someOptionalArg: $someOptionalVar) {
        id
        name
      }
    }

    And then someOptionalVar is not prefixed if the value is not sent by the user. The batched queries will be sent as below, then it will cause issues.

    query TestOneTwo($someOptionalVar: String, $someOptionalVar: String) {
      _0_foo: foo(someOptionalArg: $someOptionalVar) {
        id
        name
      }
      _1_foo: foo(someOptionalArg: $someOptionalVar) {
        id
        name
      }
    }

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.