Next plugin for .graphql and .gql files using graphql-tag
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore updated graphql-tag to the latest version Oct 28, 2018
LICENSE Initial commit Feb 13, 2018
index.js Added the source code Feb 13, 2018
package-lock.json updated graphql-tag to the latest version Oct 28, 2018
package.json updated graphql-tag to the latest version Oct 28, 2018
readme.md Updated readme.md Feb 13, 2018

readme.md

Next.js + Graphql

Use Graphql files with Next.js

Installation

npm install next-plugin-graphql

or

yarn add next-plugin-graphql

Usage

Create a next.config.js in your project

// next.config.js
const withGraphql = require('next-plugin-graphql')
module.exports = withGraphql()

Optionally you can add your custom Next.js configuration as parameter

// next.config.js
const withGraphql = require('next-plugin-graphql')
module.exports = withGraphql({
  webpack(config, options) {
    return config
  }
})