razzle-plugin-graphql
v4.2.18
Published
Use .graphql and .gql files with Razzle
Downloads
462
Readme
razzle-plugin-graphql
This package contains a plugin for using graphql/gql with Razzle
Usage in Razzle Projects
yarn add razzle-plugin-graphql --dev
With the default options
// razzle.config.js
module.exports = {
plugins: ['graphql'],
};
With custom options
No supported options right now
Options
No supported options right now
Use
To use a .graphql
or .gql
simply import them in your component.
import query from './query.graphql';
console.log(query);
// {
// "kind": "Document",
// ...
see the graphql-tag
package documentation for further information.