@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 new
Release note
The section about @graphql-tools/import of a note shared by several packages.
@graphql-tools/import@7.1.0
Minor Changes
#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.
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.