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: 24 days ago
JSON representation
Next plugin for .graphql and .gql files using graphql-tag
- Host: GitHub
- URL: https://github.com/lfades/next-plugin-graphql
- Owner: lfades
- License: mit
- Created: 2018-02-13T18:14:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T04:57:16.000Z (about 2 years ago)
- Last Synced: 2025-04-05T21:34:04.568Z (about 1 month ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 58
- Watchers: 1
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nextjs - Next Plugin Graphql - Next.js plugin for .graphql and .gql files using graphql-tag (Extensions)
- fucking-awesome-nextjs - Next Plugin Graphql - Next.js plugin for .graphql and .gql files using graphql-tag (Extensions)
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
}
})
```