gatsby-source-drupal-graphql
v2.0.12
Published
Gatsby source plugin for building websites using Drupal and GraphQL as data source. It pulls data from Drupal 9+ sites with the Drupal GraphQL Compose module.
Downloads
3
Maintainers
Readme
gatsby-source-drupal-graphql
Source plugin for pulling data (including images) into Gatsby from Drupal sites using GraphQL.
It pulls data from Drupal 9+ sites with the Drupal GraphQL Compose module installed.
Install
npm install gatsby-source-drupal-graphql
How to use
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-source-drupal-graphql`,
options: {
baseUrl: process.env.DRUPAL_BASE_URL,
endPoint: process.env.DRUPAL_ENDPOINT,
concurrency: 10, // defaults to 1
incrementalChanges: true, // defaults to false
auth: {
// Using a String token value
token: process.env.DRUPAL_AUTH_TOKEN,
// Using Simple OAuth module
oauth: {
baseUrl: process.env.DRUPAL_BASE_URL,
user: process.env.DRUPAL_AUTH_USERNAME,
password: process.env.DRUPAL_AUTH_PASSWORD,
clientId: process.env.DRUPAL_AUTH_CLIENT_ID
},
inlineImages: {
'NodeArticle': ['body'],
'NodePage': ['body'],
}
},
},
},
],
}