Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Kocal/rollup-plugin-graphql

 
 

Repository files navigation

This plugin is deprecated since one of this fork is now part of the official Rollup plugins, see @rollup/plugin-graphql.

rollup-plugin-graphql

Convert GraphQL files to ES6 modules:

⚠️ This package is a fork of the initial rollup-plugin-graphql.

This fork is compatible with Rollup ^1.0 - thanks to @bennypowers (kamilkisiela#7).

And myself, I've just published the module on NPM to make the fork more easier to install on a project.

// import a GraphQL Document from a GraphQL file,
import schema from './schema.graphql';

// or import named Query/Mutation
import { FooQuery, FooMutation } from './schema.graphql';

Installation

npm install --save-dev @kocal/rollup-plugin-graphql

Usage

import { rollup } from 'rollup';
import graphql from '@kocal/rollup-plugin-graphql';

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

License

MIT

About

Convert graphql files to ES6 modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%