gatsby-source-graphql
A Gatsby source plugin for pulling in data from GraphQL APIs.
Installation
Yarn
$ yarn add --dev gatsby-source-graphql
npm
$ npm install --save-dev gatsby-source-graphql
Usage
gatsby-source-filesystem
With // gatsby-config.js
module.exports = {
// ...
plugins: [
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'queries',
path: `${__dirname}/src/queries/`,
},
},
{
resolve: 'gatsby-source-graphql',
options: {
headers: {
authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
},
url: 'https://api.github.com/graphql',
},
},
]
}
Change Log
v1.0.0 (2018-05-06)
- [
bc71c4baf4
] - Initial commit (Neil Kistner)
License
MIT © Neil Kistner