babel-plugin-import-graphql

JSON →
library 2.8.1 ·javascript
verified May 27, 2026

A Babel plugin (v2.8.1) that enables importing .graphql and .gql files directly in JavaScript/TypeScript code, converting them into GraphQL AST objects via graphql-tag. Supports schema files with #import syntax, operation/fragment files with all import variants, and emits .d.ts declarations. Requires graphql >=0.9.6 and graphql-tag >=2.1.0 as peer dependencies. Commonly used in Apollo projects to avoid string literals and manual parsing. Active but with infrequent updates (last release January 2021).

total hits 38
actors 8 distinct systems
last hit 3d ago human
Amazonbot
4
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
6

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · VN