/rollup-plugin-graphql-import

Rollup plugin to import graphql schema definitions

Primary LanguageJavaScript

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[])