Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@xebiastudio/gatsby-source-graphql-multiple
Advanced tools
Gatsby source plugin that exposes multiple GraphQL endpoints as a single merged schema
Gatsby source plugin that exposes multiple GraphQL endpoints as a single merged schema. This plugin is based on the gatsby-source-graphql
plugin.
npm install --save @xebiastudio/gatsby-source-graphql-multiple
To use this plugin, add the following to your Gatsby configuration:
// gatsby-config.js
exports.plugins = [
{
resolve: `@xebiastudio/gatsby-source-graphql-multiple`,
options: {
typeName: `MyCombinedSource`,
fieldName: `myCombinedSource`,
// The paramName will create a query parameter on myCombinedSource that determines which source to use
// As an example, let's imagine that each source contains content in a specific language
paramName: `language`,
sources: [
{
key: `en`,
url: `example.com/en/graphql`
},
{
key: `fr`,
url: `example.com/fr/graphql`
}
]
}
}
];
This will allow you to query content in the following way:
query GetContent($language: String!) {
myCombinedSource(language: $language) {
# This part of the query is delegated to the source with key === $language
pages {
nodes {
slug
}
}
}
}
This plugin works well when you have more than one GraphQL source with the same schema, such as:
To publish a new version, run
npm version major|minor|patch
This will automatically update the version in the package.json
, commit the change and tag it. Push your changes:
git push && git push --tags
Whenever a new tag is created, Github Actions will automatically publish the new version to the Package Registry.
FAQs
Gatsby source plugin that exposes multiple GraphQL endpoints as a single merged schema
The npm package @xebiastudio/gatsby-source-graphql-multiple receives a total of 1 weekly downloads. As such, @xebiastudio/gatsby-source-graphql-multiple popularity was classified as not popular.
We found that @xebiastudio/gatsby-source-graphql-multiple demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.