rollup-plugin-graphql

Convert graphql files to ES6 modules

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
rollup-plugin-graphql
940.1.07 years ago7 years agoMinified + gzip package size for rollup-plugin-graphql in KB

Readme

rollup-plugin-graphql
Convert GraphQL files to ES6 modules:
// import a GraphQL Document from a GraphQL file,
import schema from './schema.graphql';

Installation

npm install --save-dev rollup-plugin-graphql

Usage

import { rollup } from 'rollup';
import graphql from 'rollup-plugin-graphql';

rollup({
  entry: 'main.js',
  plugins: [
    graphql()
  ]
});

License

MIT