Rollup plugin to import *.graphql
schema definitions as sdl
strings.
See: graphql-import
.
yarn add --dev rollup-plugin-graphql-import
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()],
};
Files to exclude from the plugin.
- Default:
undefined
- Type:
?(RegExp | RegExp[] | string | string[])
Files to include with the plugin.
- Default:
'**/*.graphql'
- Type:
?(RegExp | RegExp[] | string | string[])