Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kamilkisiela/rollup-plugin-graphql

Convert graphql files to ES6 modules
https://github.com/kamilkisiela/rollup-plugin-graphql

graphql rollup rollup-plugin

Last synced: 11 days ago
JSON representation

Convert graphql files to ES6 modules

Awesome Lists containing this project

README

        

# rollup-plugin-graphql

Convert GraphQL files to ES6 modules:

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

## Installation

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

## Usage

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

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

## License

MIT