@graphql-tools/import
8.0.9 · 10 Nov 2026MIT13.6M / weekRepositoryHomepagenpmAtom feed
136 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 8.x · latest line
8.0.7 – 8.0.93 releases that only update dependencies@graphql-tools/utils 13.2.2Show each
- 8.0.910 Nov 2026@graphql-tools/utils 13.2.2
- 8.0.831 Oct 2026@graphql-tools/utils 13.2.1
- 8.0.726 Oct 2026@graphql-tools/utils 13.2.0
8.0.6
22 Oct 2026processImportkeeps the AST nodes collected from#importinstead of printing every definition to SDL and parsing that string again.A type that many other types depend on is stored in each of those sets, so the same node was printed over and over. Two files can also carry identical SDL (for example the same
type Queryafter a field import). Those are still de-duplicated: skip a node already seen, and skip a second node that prints to the same SDL. The first node is kept. Leading comments stay on that node (for example# eslint-disable-next-lineabove a query).const document = processImport('./schema.graphql'); // document.definitions are the nodes parsed from the imported files
@graphql-tools/import@8.0.6
Patch Changes
processImportkeeps the AST nodes collected from#importinstead of printing every definition to SDL and parsing that string again.A type that many other types depend on is stored in each of those sets, so the same node was printed over and over. Two files can also carry identical SDL (for example the same
type Queryafter a field import). Those are still de-duplicated: skip a node already seen, and skip a second node that prints to the same SDL. The first node is kept. Leading comments stay on that node (for example# eslint-disable-next-lineabove a query).const document = processImport('./schema.graphql'); // document.definitions are the nodes parsed from the imported files
8.0.0 – 8.0.56 releases with no change for you5 dependency updates, 1 without a note@graphql-tools/utils 13.1.2Show each
- 8.0.522 Oct 2026@graphql-tools/utils 13.1.2
- 8.0.420 Oct 2026@graphql-tools/utils 13.1.1
- 8.0.320 Oct 2026@graphql-tools/utils 13.1.0
- 8.0.219 Oct 2026@graphql-tools/utils 13.0.2
- 8.0.119 Oct 2026@graphql-tools/utils 13.0.1
- 8.0.019 Oct 2026no note
- 7.x
7.2.4
15 Oct 2026Dependencies updates:
@graphql-tools/import@7.2.4
Patch Changes
Dependencies updates:
Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
7.2.1 – 7.2.33 releases that only update dependencies@graphql-tools/utils 12.0.4Show each
- 7.2.312 Oct 2026@graphql-tools/utils 12.0.4
- 7.2.230 Sep 2026@graphql-tools/utils 12.0.3
- 7.2.130 Sep 2026@graphql-tools/utils 12.0.2
7.2.0
7 Sep 2026# importpaths may use arequire:prefix, resolved with Node'srequire.resolvefrom the importing file. Example:# import Post from "require:blog-graphql-types/schema.graphql"or# import A from "require:./a.graphql".# import "./file.graphql"(space after#) is a valid default import, and#importis processed even when it is not the first non-blank line of the file.Keep leading GraphQL comments (for example
# eslint-disable-next-lineabove a query) when#importmerges documents. PreviouslyprocessImportreprinted definitions and dropped those comments from the merged source.
@graphql-tools/import@7.2.0
Minor Changes
# importpaths may use arequire:prefix, resolved with Node'srequire.resolvefrom the importing file. Example:# import Post from "require:blog-graphql-types/schema.graphql"or# import A from "require:./a.graphql".
Patch Changes
# import "./file.graphql"(space after#) is a valid default import, and#importis processed even when it is not the first non-blank line of the file.Keep leading GraphQL comments (for example
# eslint-disable-next-lineabove a query) when#importmerges documents. PreviouslyprocessImportreprinted definitions and dropped those comments from the merged source.# import *keeps unreferenced types that carry a federation@key(subgraph entities). Other unused types are still tree-shaken, matching existingimport *tests.Named
# importof a type no longer drops interfaces implemented by union members.Before this, a file like:
# import Foo from "./types.graphql" type Query { foo: Foo }with
types.graphqlcontainingtype Foo { pet: Pet },union Pet = Cat | Dog, andtype Cat implements Animalbuilt an invalid schema (Unknown type "Animal").CatandDogwere pulled in through the union, butAnimalwas not.Forward dependencies (fields,
implements, union members) are now closed transitively. Reverse implementers are still attached only when the interface itself is the import, so# import Query.postsdoes not pull every otherQueryfield.
7.1.19
12 Aug 2026#8259
85f1de0
Thanks @lemonmade! - perf(import): remove redundant work inaddDefinition's dependency traversaladdDefinitionrecurses across the whole dependency graph while assembling each definition's
imported dependencies. Two things were repeated on every call:Pure performance change; output is unchanged (the existing import tests pass and a real-world
~12k-line schema produces byte-identical results). Building on theprintmemoization, this took
the same codegen pass from ~17s to ~13s. The remaining cost is the O(n²) shape of the closure
traversal itself (each definition's transitive set is still rebuilt independently); reducing that
is left for a follow-up as it's a more invasive change.#8258
6bacf57
Thanks @lemonmade! - perf(import): memoizeprintper node when
assembling imported definitionsprocessImportde-duplicates the collected definitions by printing each one to SDL and comparing
the strings. A single definition node appears in many of the dependency sets (any
widely-referenced type is pulled in by every definition that depends on it), soprintwas called
roughly O(n²) times for n unique nodes. For large, densely-connected schemas this print/visit work
dominates import time.Memoizing
printby node identity makes each unique node print at most once.printis a pure
function of its node, so the output is identical; this is a pure performance change. On a
~12k-line schema imported across three projects, this reduced a downstream codegen pass from ~133s
to ~17s.
@graphql-tools/import@7.1.19
Patch Changes
#8259
85f1de0
Thanks @lemonmade! - perf(import): remove redundant work inaddDefinition's dependency traversaladdDefinitionrecurses across the whole dependency graph while assembling each definition's
imported dependencies. Two things were repeated on every call:visitedFiles.get(filePath)— invariant for the duration of theprocessImportcall, so it's
now looked up once and hoisted out of the recursion.the per-field dependency-name derivation (
visitFieldDefinitionNode/visitInputValueDefinitionNodeinto a freshMap) — a pure function of the field node and the
file's static dependency map, so it's now memoized by field identity instead of recomputed every
time the owning definition is added to a set.
Pure performance change; output is unchanged (the existing import tests pass and a real-world
~12k-line schema produces byte-identical results). Building on theprintmemoization, this took
the same codegen pass from ~17s to ~13s. The remaining cost is the O(n²) shape of the closure
traversal itself (each definition's transitive set is still rebuilt independently); reducing that
is left for a follow-up as it's a more invasive change.#8258
6bacf57
Thanks @lemonmade! - perf(import): memoizeprintper node when
assembling imported definitionsprocessImportde-duplicates the collected definitions by printing each one to SDL and comparing
the strings. A single definition node appears in many of the dependency sets (any
widely-referenced type is pulled in by every definition that depends on it), soprintwas called
roughly O(n²) times for n unique nodes. For large, densely-connected schemas this print/visit work
dominates import time.Memoizing
printby node identity makes each unique node print at most once.printis a pure
function of its node, so the output is identical; this is a pure performance change. On a
~12k-line schema imported across three projects, this reduced a downstream codegen pass from ~133s
to ~17s.
7.1.13 – 7.1.186 releases that only update dependencies@graphql-tools/utils 11.2.2Show each
- 7.1.1817 Jul 2026@graphql-tools/utils 11.2.2
- 7.1.1717 Jul 2026@graphql-tools/utils 11.2.1
- 7.1.166 Jul 2026@graphql-tools/utils 11.2.0
- 7.1.1528 Jun 2026@graphql-tools/utils 11.1.1
- 7.1.1423 Apr 2026@graphql-tools/utils 11.1.0
- 7.1.139 Apr 2026@graphql-tools/utils 11.0.1
7.1.10
22 Jan 2026#7850
6047348Thanks @dependabot! - dependencies updates:#7864
e55d7e7Thanks @dependabot! - dependencies updates:
7.1.9
7 Jan 2026#7798
86c350d
Thanks @dependabot! - dependencies updates:
@graphql-tools/import@7.1.9
Patch Changes
#7798
86c350d
Thanks @dependabot! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.21.1↗︎
(from^0.21.0, independencies)
7.1.8
28 Nov 2025#7588
2118a80
Thanks @EmrysMyrddin! - dependencies updates:
@graphql-tools/import@7.1.8
Patch Changes
#7588
2118a80
Thanks @EmrysMyrddin! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.21.0↗︎
(from^0.20.2, independencies)
#7721
92f1622
Thanks @renovate! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.21.0↗︎
(from^0.20.2, independencies)
7.1.7
21 Nov 2025#7588
2118a80
Thanks @EmrysMyrddin! - dependencies updates:
@graphql-tools/import@7.1.8
Patch Changes
#7588
2118a80
Thanks @EmrysMyrddin! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.21.0↗︎
(from^0.20.2, independencies)
#7721
92f1622
Thanks @renovate! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.21.0↗︎
(from^0.20.2, independencies)
7.1.4 – 7.1.63 releases that only update dependencies@graphql-tools/utils 10.10.3Show each
- 7.1.612 Nov 2025@graphql-tools/utils 10.10.3
- 7.1.511 Nov 2025@graphql-tools/utils 10.10.2
- 7.1.44 Nov 2025@graphql-tools/utils 10.10.1
7.1.2
22 Sep 202541cc67a
Thanks @renovate[bot]! - dependencies updates:
7.1.1
5 Sep 2025#7433
07124d5
Thanks @HunterLarco! - Fix support for absolute path aliases in
GraphQL importsPath aliases configured with absolute paths (e.g.,
/*→src/*) now work correctly alongside
relative aliases (e.g.,@/*→src/*). This allows more flexible aliasing configurations when
using tsconfig.json#paths syntax for GraphQL
imports.#7437
211ef44
Thanks @HunterLarco! - enhance GraphQL schema import error
debugging with source locations
7.1.0
26 Aug 2025#7310
692cfeb
Thanks @HunterLarco! - GraphQL schemas in large projects,
especially monorepos, suffer from fragile and verbose relative import paths that become difficult
to maintain as projects grow. This change brings TypeScript's populartsconfig.json#pathsaliasing syntax to GraphQL
imports, enabling clean, maintainable import statements across your GraphQL schema files.Before - Brittle relative imports:
#import "../../../shared/models/User.graphql" #import "../../../../common/types/Product.graphql"
After - Clean, semantic aliases:
#import "@models/User.graphql" #import "@types/Product.graphql"
Configuration Example
{ mappings: { '@models/*': path.join(__dirname, './models/*'), '@types/*': path.join(__dirname, './shared/types/*'), } }This change is introduced in a backwards compatible way to ensure no existing use cases are broken
while using familiar patterns to typescript developers for structuring import aliases.
7.0.21
21 Jul 2025Only updates a dependency:@graphql-tools/utils 10.9.1
7.0.20
17 Jul 2025@graphql-tools/import@7.0.20
Patch Changes
#7229
a824120
Thanks @jdolle! - dependencies updates:Added dependency
@theguild/federation-composition@^0.18.3↗︎
(todependencies)
#7260
d15c850
Thanks @renovate! - dependencies updates:Updated dependency
@theguild/federation-composition@^0.19.0↗︎
(from^0.18.3, independencies)
#7229
a824120
Thanks @jdolle! - Adjust dependency and definition logic to include
federated links
7.0.10 – 7.0.189 releases that only update dependencies@graphql-tools/utils 10.8.6Show each
- 7.0.1813 Mar 2025@graphql-tools/utils 10.8.6
- 7.0.1713 Mar 2025@graphql-tools/utils 10.8.5
- 7.0.163 Mar 2025@graphql-tools/utils 10.8.4
- 7.0.1525 Feb 2025@graphql-tools/utils 10.8.3
- 7.0.1421 Feb 2025@graphql-tools/utils 10.8.2
- 7.0.1310 Feb 2025@graphql-tools/utils 10.8.1
- 7.0.1210 Feb 2025@graphql-tools/utils 10.8.0
- 7.0.116 Jan 2025@graphql-tools/utils 10.7.2
- 7.0.102 Jan 2025@graphql-tools/utils 10.7.1
7.0.9
24 Dec 20247.0.7 – 7.0.82 releases that only update dependencies@graphql-tools/utils 10.6.4Show each
- 7.0.814 Dec 2024@graphql-tools/utils 10.6.4
- 7.0.713 Dec 2024@graphql-tools/utils 10.6.3
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.