This plugin is no longer needed for using the Datenguide API within Gatsby,
as Gatsby now supports 3rd party GraphQL APIs out of the box via the
gatsby-source-graphql
.
See the datenguide-frontend
Gatsby configuration for an example of how to use gatsby-source-graphql
with the Datenguide API.
Plugin for pulling data into Gatsby from the Datenguide API
yarn add gatsby-source-datenguide
// In your gatsby-config.js
plugins: [
{
resolve: 'gatsby-source-datenguide',
options: {
queryUrl: 'http://127.0.0.1:5000/\?query\=',
}
}
];
You can query nodes created from Datenguide like the following:
query StoriesQuery {
allDistrict
}