Packages

@graphql-tools/import

8.0.9 · 10 Nov 2026MIT13.6M / weekRepositoryHomepagenpmAtom feed

Your version

7.2.0

7 Sep 2026Where it was published

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

  • # import paths may use a require: prefix, resolved with Node's require.resolve from 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 #import is processed even when it is not the first non-blank line of the file.

  • Keep leading GraphQL comments (for example # eslint-disable-next-line above a query) when #import merges documents. Previously processImport reprinted 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 existing import * tests.

  • Named # import of 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.graphql containing type Foo { pet: Pet }, union Pet = Cat | Dog, and type Cat implements Animal built an invalid schema (Unknown type "Animal"). Cat and Dog were pulled in through the union, but Animal was 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.posts does not pull every other Query field.

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.