Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
gatsby-source-graphql
Advanced tools
A Gatsby source plugin for pulling in data from GraphQL APIs.
$ yarn add --dev gatsby-source-graphql
$ npm install --save-dev gatsby-source-graphql
gatsby-source-filesystem
// gatsby-config.js
// Optionally pull in environment variables
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
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',
},
},
]
}
# src/queries/github.graphql
{
viewer {
name
url
}
}
Given the above example with a GraphQL file named github.graphql
, you would query Gatsby like so:
query GitHubViewerQuery {
githubGraphQl {
viewer {
name
url
}
}
}
3403024845
] - Add preversion script to build before release (Neil Kistner)MIT © Neil Kistner
FAQs
Gatsby plugin which adds a third-party GraphQL API to Gatsby GraphQL
The npm package gatsby-source-graphql receives a total of 17,598 weekly downloads. As such, gatsby-source-graphql popularity was classified as popular.
We found that gatsby-source-graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.