Skip to Content
GraphQL Tools
Changelogsgraphql-tag-pluck

@graphql-tools/graphql-tag-pluck

9.0.3

Patch Changes

  • Updated dependencies [34b740b]:
    • @graphql-tools/utils@13.0.2

9.0.2

Patch Changes

  • Updated dependencies [15efe55]:
    • @graphql-tools/utils@13.0.1

9.0.1

Patch Changes

  • #8537  d4268db Thanks @ardatan ! - Deduplicate dual-marker template plucks and convert Babel’s 0-based columns to GraphQL Source 1-based offsets so standalone #graphql templates at column 0 no longer throw.

9.0.0

Major Changes

  • #8515  1d70c62 Thanks @ardatan ! - Drop GraphQL v14/v15 support and require Node.js >= 22.18.

    • graphql peer range is now ^16.0.0 || ^17.0.0.
    • engines.node is now >=22.18.0 (Node fs.glob + Babel 8).
    • Dev tooling and @graphql-tools/graphql-tag-pluck move to Babel 8 (@babel/core / parser / traverse / types).
    • The standalone cross-inspect package is discontinued. Use inspect from @graphql-tools/utils instead (Node util.inspect via process.getBuiltinModule, with a small JSON.stringify / String fallback).

    Removed @graphql-tools/utils exports

    RemovedUse instead
    getArgumentValuesimport { getArgumentValues } from 'graphql'
    coerceInputs / graphqlJSCompatgraphql@16+ APIs (getArgumentValues, etc.)
    createDeferred / createDeferredPromiseconst { promise, resolve, reject } = Promise.withResolvers()
    createGraphQLErrornew GraphQLError(message, options) from graphql
    mapMaybePromisehandleMaybePromise from @whatwg-node/promise-helpers
    isPromise / fakePromise / mapAsyncIterator / MaybePromise@whatwg-node/promise-helpers
    registerAbortSignalListener / getAbortPromiseAbortSignal APIs (throwIfAborted, addEventListener('abort', …, { once: true }), AbortSignal.any, …)
    withCancel / getAsyncIterableWithCancel / getAsyncIteratorWithCancelHandle cancellation on the async iterator’s return() (or your transport abort path)
    debugTimerStart / debugTimerEndYour own timing / console.time if needed
    PromiseWithResolvers (type)Built-in PromiseWithResolvers<T> / return type of Promise.withResolvers()

    inspect and the WeakMap memoize1…memoize2of5 helpers remain on @graphql-tools/utils (inspect is no longer re-exported from cross-inspect).

    File matching (globby → fs.glob)

    Loaders and @graphql-tools/load-files now use Node’s fs.glob through:

    import { matchFiles, matchFilesSync } from '@graphql-tools/load-files';

    Directory symlinks are followed for recursive (**) patterns:

    • On Node.js ≥26.1 (and ≥24.16 where backported), fs.glob followSymlinks is used.
    • On older engines, symlink directories are discovered only under each pattern’s literal prefix (not the whole cwd) and patterns are re-rooted.
    • Non-recursive / literal patterns skip the symlink walk entirely.

    @graphql-tools/executor hot-path caches (collectSubfields, argument coercion, @stream detection) use memoize2 / memoize3 from utils. collectSubFields in utils stays unmemoized so the executor can own a single memoize3 layer.

    Errors and other cleanup

    • Prefer new GraphQLError(message, options) from graphql. Experimental schema coordinate support remains on locatedError / relocatedError / getSchemaCoordinate.
    • Removed GraphQL versions older than 16 compatibility branches (error construction, validation rule name suffixes, URL.canParse fallback).
    • Promise helpers should be imported from @whatwg-node/promise-helpers (handleMaybePromise, isPromise, fakePromise, mapAsyncIterator, MaybePromise) rather than re-exported from utils.

Minor Changes

  • #8532  a2ef423 Thanks @ardatan ! - Recognize #graphql at the start of template literals by default.

    Until now, untagged template literals were only plucked when they had a leading block comment such as /* GraphQL */ (gqlMagicComment). Many setups instead use a #graphql marker inside the string:

    export const typeDefs = `#graphql type Query { hello: String } `

    That marker is GraphQL source text, not a JavaScript leading comment, so gqlMagicComment could never see it. Without extraction, loaders fall back to importing the module, which stays cached under GraphQL Codegen --watch and leaves generated types stale.

    This release adds gqlHashComment (default: 'graphql'):

    • #graphql is recognized out of the box
    • set gqlHashComment: 'gql' (or any other value) for markers like #gql
    • set gqlHashComment: '' to disable hash-comment detection

    /* GraphQL */ via gqlMagicComment and the isGqlTemplateLiteral / pluckStringFromFile hooks keep working as before.

Patch Changes

8.3.41

Patch Changes

8.3.40

Patch Changes

  • Updated dependencies [fd95dc9]:
    • @graphql-tools/utils@12.0.4

8.3.39

Patch Changes

  • Updated dependencies [19f5b33]:
    • @graphql-tools/utils@12.0.3

8.3.38

Patch Changes

  • Updated dependencies [b1fbba2, 20d36a5]:
    • @graphql-tools/utils@12.0.2

8.3.37

Patch Changes

8.3.36

Patch Changes

  • Updated dependencies [2273c21]:
    • @graphql-tools/utils@12.0.0

8.3.35

Patch Changes

  • Updated dependencies [e90719b]:
    • @graphql-tools/utils@11.2.2

8.3.34

Patch Changes

  • Updated dependencies [615c1a2]:
    • @graphql-tools/utils@11.2.1

8.3.33

Patch Changes

  • Updated dependencies [2609c94]:
    • @graphql-tools/utils@11.2.0

8.3.32

Patch Changes

8.3.31

Patch Changes

  • Updated dependencies [a4b7dce]:
    • @graphql-tools/utils@11.1.0

8.3.30

Patch Changes

  • Updated dependencies [ae36a0e]:
    • @graphql-tools/utils@11.0.1

8.3.29

Patch Changes

8.3.28

Patch Changes

8.3.27

Patch Changes

  • Updated dependencies [6f3776c]:
    • @graphql-tools/utils@11.0.0

8.3.26

Patch Changes

  • Updated dependencies [2118a80]:
    • @graphql-tools/utils@10.11.0

8.3.25

Patch Changes

  • Updated dependencies [2fe123a]:
    • @graphql-tools/utils@10.10.3

8.3.24

Patch Changes

  • Updated dependencies [dddc5f6]:
    • @graphql-tools/utils@10.10.2

8.3.23

Patch Changes

  • Updated dependencies [fbb58b5]:
    • @graphql-tools/utils@10.10.1

8.3.22

Patch Changes

8.3.21

Patch Changes

  • Updated dependencies [32d0457]:
    • @graphql-tools/utils@10.9.1

8.3.20

Patch Changes

  • Updated dependencies [22af985, 53db005]:
    • @graphql-tools/utils@10.9.0

8.3.19

Patch Changes

  • Updated dependencies [d123e26]:
    • @graphql-tools/utils@10.8.6

8.3.18

Patch Changes

8.3.17

Patch Changes

  • Updated dependencies [155944b]:
    • @graphql-tools/utils@10.8.4

8.3.16

Patch Changes

  • Updated dependencies [4a2eb14]:
    • @graphql-tools/utils@10.8.3

8.3.15

Patch Changes

  • Updated dependencies [3547bba]:
    • @graphql-tools/utils@10.8.2

8.3.14

Patch Changes

  • Updated dependencies [651a5dc]:
    • @graphql-tools/utils@10.8.1

8.3.13

Patch Changes

  • Updated dependencies [0a3e193, 357b2ee]:
    • @graphql-tools/utils@10.8.0

8.3.12

Patch Changes

  • Updated dependencies [53bb601, 53bb601]:
    • @graphql-tools/utils@10.7.2

8.3.11

Patch Changes

  • Updated dependencies [4912f19]:
    • @graphql-tools/utils@10.7.1

8.3.10

Patch Changes

  • Updated dependencies [2c70d27]:
    • @graphql-tools/utils@10.7.0

8.3.9

Patch Changes

  • Updated dependencies [6a8123b]:
    • @graphql-tools/utils@10.6.4

8.3.8

Patch Changes

  • Updated dependencies [020b9e4]:
    • @graphql-tools/utils@10.6.3

8.3.7

Patch Changes

8.3.6

Patch Changes

  • Updated dependencies [1e02935]:
    • @graphql-tools/utils@10.6.1

8.3.5

Patch Changes

  • Updated dependencies [414e404]:
    • @graphql-tools/utils@10.6.0

8.3.4

Patch Changes

  • Updated dependencies [dc5043b]:
    • @graphql-tools/utils@10.5.6

8.3.3

Patch Changes

8.3.2

Patch Changes

8.3.1

Patch Changes

8.3.0

Minor Changes

8.2.0

Minor Changes

Patch Changes

  • Updated dependencies [f85c093]:
    • @graphql-tools/utils@10.0.13

8.1.0

Minor Changes

8.0.2

Patch Changes

8.0.1

Patch Changes

8.0.0

Major Changes

Patch Changes

7.5.2

Patch Changes

7.5.1

Patch Changes

7.5.0

Minor Changes

  • #4877  42ad8df8 Thanks @tristanmenzel ! - Adds support for matching graphql queries declared with typescript’s ‘as const’ expression. eg. graphql(query myQuery(...) as const)

7.4.6

Patch Changes

7.4.5

Patch Changes

  • Updated dependencies [b5c8f640]:
    • @graphql-tools/utils@9.2.1

7.4.4

Patch Changes

7.4.3

Patch Changes

  • Updated dependencies [e3ec35ed]:
    • @graphql-tools/utils@9.1.4

7.4.2

Patch Changes

  • Updated dependencies [904fe770]:
    • @graphql-tools/utils@9.1.3

7.4.1

Patch Changes

  • Updated dependencies [13c24883]:
    • @graphql-tools/utils@9.1.2

7.4.0

Minor Changes

Patch Changes

7.3.12

Patch Changes

  • Updated dependencies [7411a5e7]:
    • @graphql-tools/utils@9.1.1

7.3.11

Patch Changes

  • Updated dependencies [c0639dd0]:
    • @graphql-tools/utils@9.1.0

7.3.10

Patch Changes

  • Updated dependencies [d83b1960]:
    • @graphql-tools/utils@9.0.1

7.3.9

Patch Changes

7.3.8

Patch Changes

  • Updated dependencies [f7daf777]:
    • @graphql-tools/utils@8.13.1

7.3.7

Patch Changes

7.3.6

Patch Changes

  • Updated dependencies [43c736bd]:
    • @graphql-tools/utils@8.12.0

7.3.5

Patch Changes

7.3.4

Patch Changes

  • Updated dependencies [4fe3d9c0]:
    • @graphql-tools/utils@8.10.1

7.3.3

Patch Changes

  • Updated dependencies [2609d71f]:
    • @graphql-tools/utils@8.10.0

7.3.2

Patch Changes

  • #4624  e3167edc Thanks @n1ru4l ! - Fix CommonJS TypeScript resolution with moduleResolution node16 or nodenext

  • Updated dependencies [e3167edc]:

    • @graphql-tools/utils@8.9.1

7.3.1

Patch Changes

  • Updated dependencies [2a3b45e3]
    • @graphql-tools/utils@8.9.0

7.3.0

Minor Changes

  • d76a299c: Support TypeScript module resolution.

Patch Changes

  • Updated dependencies [a0abbbcd]
  • Updated dependencies [d76a299c]
    • @graphql-tools/utils@8.8.0

7.2.11

Patch Changes

  • Updated dependencies [4914970b]
    • @graphql-tools/utils@8.7.0

7.2.10

Patch Changes

  • 041c5ba1: Use caret range for the tslib dependency
  • Updated dependencies [041c5ba1]
    • @graphql-tools/utils@8.6.13

7.2.9

Patch Changes

  • Updated dependencies [da7ad43b]
    • @graphql-tools/utils@8.6.12

7.2.8

Patch Changes

  • Updated dependencies [c0762ee3]
    • @graphql-tools/utils@8.6.11

7.2.7

Patch Changes

  • Updated dependencies [0fc510cb]
    • @graphql-tools/utils@8.6.10

7.2.6

Patch Changes

  • Updated dependencies [31a33e2b]
    • @graphql-tools/utils@8.6.9

7.2.5

Patch Changes

  • Updated dependencies [cb238877]
    • @graphql-tools/utils@8.6.8

7.2.4

Patch Changes

  • Updated dependencies [0bbb1769]
    • @graphql-tools/utils@8.6.7

7.2.3

Patch Changes

  • Updated dependencies [904c0847]
    • @graphql-tools/utils@8.6.6

7.2.2

Patch Changes

  • cdecc1b5: adding svelte file support

7.2.1

Patch Changes

  • 4e6fe1c1: adding svelte file support

7.2.0

Minor Changes

  • eb657d9c: refactor: replace deprecated String.prototype.substr()

7.1.9

Patch Changes

  • Updated dependencies [be2c02d7]
    • @graphql-tools/utils@8.6.5

7.1.8

Patch Changes

  • Updated dependencies [d36d530b]
    • @graphql-tools/utils@8.6.4

7.1.7

Patch Changes

  • 0c0c6857: fix - align versions

7.1.6

Patch Changes

  • 18341363: feat(visitResult): ignore if field not present in visited object
  • Updated dependencies [18341363]
    • @graphql-tools/utils@8.6.2

7.1.5

Patch Changes

  • 7e205e26: Don’t pin babel dependencies to an exact version

7.1.4

Patch Changes

  • 6bb127b0: Fix returning whitespace only results if skipIndent is set to true

7.1.3

Patch Changes

  • 4bfb3428: enhance: use ^ for tslib dependency
  • Updated dependencies [4bfb3428]
    • @graphql-tools/utils@8.5.1

7.1.2

Patch Changes

  • 1043219f: fix implicit dependencies
  • Updated dependencies [1043219f]
    • @graphql-tools/utils@8.2.5

7.1.1

Patch Changes

  • d07d1dce: fix ESM usage

7.1.0

Minor Changes

  • c5b0719c: feat: GraphQL v16 support

Patch Changes

  • Updated dependencies [c5b0719c]
  • Updated dependencies [c5b0719c]
  • Updated dependencies [c5b0719c]
  • Updated dependencies [c5b0719c]
  • Updated dependencies [c5b0719c]
    • @graphql-tools/utils@8.2.0

7.0.5

Patch Changes

  • e50852e6: use version ranges instead of a fixed version for the graphql-tools package versions

7.0.4

Patch Changes

  • Updated dependencies [2c807ddb]
    • @graphql-tools/utils@8.1.1

7.0.3

Patch Changes

  • Updated dependencies [b9684631]
  • Updated dependencies [9ede806a]
  • Updated dependencies [67691b78]
    • @graphql-tools/utils@8.1.0

7.0.2

Patch Changes

  • Updated dependencies [04830049]
    • @graphql-tools/utils@8.0.2

7.0.1

Patch Changes

  • Updated dependencies [b823dbaf]
    • @graphql-tools/utils@8.0.1

7.0.0

Major Changes

  • 34c31de0: BREAKING CHANGE
    • feat(graphql-tag-pluck): keep locationOffset and return graphql-js Source instead of string

Patch Changes

  • f1d7b3c2: ensure operations with GraphQL magic comment are only parsed once.
  • Updated dependencies [af9a78de]
  • Updated dependencies [9c26b847]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [dae6dc7b]
  • Updated dependencies [6877b913]
  • Updated dependencies [c42e811d]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [8c8d4fc0]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [74581cf3]
  • Updated dependencies [c0ca3190]
  • Updated dependencies [982c8f53]
  • Updated dependencies [7d3e3006]
  • Updated dependencies [7d3e3006]
    • @graphql-tools/utils@8.0.0

6.5.1

Patch Changes

  • f80ce4f4: Added support for loading tags from babel-plugin-relay/macro as well

6.5.0

Minor Changes

  • 8e030db0: Updated list of default plucked tags (added urql and Relay)

6.4.2

Patch Changes

  • f1bec378: fix(graphql-tag-pluck): fix @vue/compiler-sfc import issue

6.4.1

Patch Changes

  • c8e26b8c: fix(graphql-tag-pluck): fix warning about providing id for vue compiler

6.4.0

Minor Changes

  • 76162cc8: feat(graphql-tag-pluck): vue 3 support

6.3.0

Minor Changes

  • 9ee20108: feat(graphql-tag-pluck): Support Vue files with TypeScript

6.2.6

Patch Changes

  • Updated dependencies [be1a1575]
    • @graphql-tools/utils@7.0.0

6.2.5

Patch Changes

  • e9ed9394: Change internal API to add more details on found locations, and export parseCode for lower-level parsing
  • 54b440a9: allow to skip indentation while plucking

6.2.4

Patch Changes

  • 533d6d53: Bump all packages to allow adjustments
  • Updated dependencies [32c3c4f8]
  • Updated dependencies [533d6d53]
    • @graphql-tools/utils@6.2.4