1.0.2 • Published 5 years ago

rollup-plugin-graphql-import v1.0.2

Weekly downloads
3
License
Unlicense
Repository
github
Last release
5 years ago

rollup-plugin-graphql-import

CircleCI Greenkeeper badge

Rollup plugin to import *.graphql schema definitions as sdl strings. See: graphql-import.

Installation

yarn add --dev rollup-plugin-graphql-import

Usage

rollup.config.js:

// @flow

import graphqlImport from 'rollup-plugin-graphql-import';

export default {
  input: 'src/Schema.graphql',
  output: [{ file: 'dist/index.js', format: 'esm' }],
  plugins: [graphqlImport()],
};

Options

exclude

Files to exclude from the plugin.

  • Default: undefined
  • Type: ?(RegExp | RegExp[] | string | string[])

include

Files to include with the plugin.

  • Default: '**/*.graphql'
  • Type: ?(RegExp | RegExp[] | string | string[])