Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lfades/next-plugin-graphql

Next plugin for .graphql and .gql files using graphql-tag
https://github.com/lfades/next-plugin-graphql

Last synced: 3 days ago
JSON representation

Next plugin for .graphql and .gql files using graphql-tag

Awesome Lists containing this project

README

        

# Next.js + Graphql

Use [Graphql](http://graphql.org/) files with [Next.js](https://github.com/zeit/next.js)

## Installation

```sh
npm install next-plugin-graphql
```

or

```sh
yarn add next-plugin-graphql
```

## Usage

Create a `next.config.js` in your project

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

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

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