next-graphql-loader

1.0.1 • Public • Published

next-graphql-loader

Allows importing .graphql or .gql files on Nextjs via graphql-tag.

Installation

npm install --save graphql next-graphql-loader

Or using yarn:

yarn add graphql next-graphql-loader

Then, import the library in your next.config.js file.

// next.config.js
const withGraphql = require("next-svgr-react-component");
 
module.exports = withGraphql({});

or, with next-compose-plugins:

const withGraphql = require("next-svgr-react-component");
 
module.exports = withPlugins([withGraphql])

Usage:

Just import any .graphql file :)

Readme

Keywords

none

Package Sidebar

Install

npm i next-graphql-loader

Weekly Downloads

901

Version

1.0.1

License

MIT

Unpacked Size

2.73 kB

Total Files

5

Last publish

Collaborators

  • negan1911