Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lfades/next-plugin-graphql
- Owner: lfades
- License: mit
- Created: 2018-02-13T18:14:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T04:57:16.000Z (almost 2 years ago)
- Last Synced: 2024-12-04T13:41:58.951Z (9 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 57
- Watchers: 2
- 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
}
})
```