razzle-plugin-graphql

Use .graphql and .gql files with Razzle

Usage no npm install needed!

<script type="module">
  import razzlePluginGraphql from 'https://cdn.skypack.dev/razzle-plugin-graphql';
</script>

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.