graphql-import-node

JSON →
library 0.0.5 ·javascript
verified Jun 7, 2026

Enables Node.js to import `.graphql` files as compiled GraphQL DocumentNode objects using require.extensions. Current stable version is 0.0.5 (last release). Low maintenance, no recent updates. Differs from alternatives (e.g., webpack graphql-tag/loader) by being a simple Node.js hook without bundler dependency. Requires peer dependency `graphql` and must be loaded before any GraphQL file imports. Supports CommonJS, ESM (via import), TypeScript (with typings), and Jest.