Socket
Book a DemoInstallSign in
Socket

@kocal/rollup-plugin-graphql

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kocal/rollup-plugin-graphql

Convert graphql files to ES6 modules

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

rollup-plugin-graphql

Convert GraphQL files to ES6 modules:

:warn: This package is a fork of the initial rollup-plugin-graphql. This fork is compatible with Rollup ^1.0 - thanks to @bennypowers (https://github.com/kamilkisiela/rollup-plugin-graphql/pull/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 'rollup-plugin-graphql';

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

License

MIT

Keywords

graphql

FAQs

Package last updated on 18 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts