graphql-min

JSON →
library 1.0.1 ·javascript
verified Jun 4, 2026

A Babel plugin that minifies GraphQL queries written as tagged template literals at build time. Current version 1.0.1 removes unnecessary whitespace from gql template strings, transforming them into compact queries. The tool is simple and focused, with no runtime overhead since minification occurs during compilation. It is an alternative to other GraphQL minifiers like graphql-minify or custom babel transforms, but is extremely lightweight and easy to set up via .babelrc. The package is maintained with a low release cadence.