@graphql-tools/import
8.0.9 · 10 Nov 2026MIT13.6M / weekRepositoryHomepagenpmAtom feed
7.2.4 is the newest release of 7.x.
In short
1 new4 fixed1 internal
Release note
The section about @graphql-tools/import of a note shared by several packages.
@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.
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.