Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 335 Bytes

readme.md

File metadata and controls

29 lines (22 loc) · 335 Bytes

GraphQL minifier through tagged template

Converts your graphql query to minified one via babel plugin

in .babelrc, add

{
  "plugins": ["graphql-min/babel"]  
}
import gql from 'graphql-min';

const query = gql`{
  foo {
    bar {
      baz
    }
  }
}`

becomes

const query = `{foo{bar{baz}}}`