babel-plugin-graphql-query-minifier

JSON →
library 0.0.2 ·javascript
verified Jun 4, 2026

A babel plugin that minifies GraphQL query strings at compile time by removing unnecessary whitespace, newlines, and ensuring compact syntax. Current version 0.0.2, released once. Key differentiators: (1) WASM-based core makes it 3x faster than alternatives like babel-plugin-transform-compress-graphql, (2) removes more characters (e.g., spaces after argument types and fragment spreads) resulting in smaller bundles, (3) supports both tagged template literals (default `gql`) and magic comments (default `/* graphql */`) with customizable patterns. Suitable for optimizing GraphQL strings in JavaScript/TypeScript projects during bundling.