babel-plugin-import-graphql-files
v1.0.1
Published
Babel plugin to import .gql,.graphql files
Downloads
6
Readme
babel-plugin-import-graphql-files
This babel plugin lets you import GraphQL files into your Javascript application as compiled schema definitions. Which uses graphql-tag package to compile them into their compiled equivalent.
Installation
npm
npm install --save-dev babel-plugin-import-graphql-files
yarn
yarn add --dev babel-plugin-import-graphql-files
Usage
In your babel configuration file, just add the package name into your plugins array.
{
plugins: [
'babel-plugin-import-graphql-files'
]
}
or
{
plugins: [
'import-graphql-files'
]
}