1.0.1 • Published 5 years ago

gatsby-source-drupal-cross-bundle v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

gatsby-source-drupal-cross-bundle

source plugin for pulling data provided by JSON:API Cross Bundles modules. This module provides all the bundles data under it's entity type Which will helps to build listing pages more easily and smiplifies more other queries where data required from more than one resource.

apiBase Option allows changing the API entry point depending on the version of jsonapi used by your Drupal instance. The default value is jsonapi, which has been used since jsonapi version 8.x-1.0-alpha4.

Installing gatsby-source-drupal-cross-bundle

npm install --save gatsby-source-drupal-cross-bundle

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-drupal-cross-bundle`,
      options: {
        baseUrl: `http://example.com/`, //example baseUrl
        apiBase: `api`, // optional, defaults to `jsonapi`
      },
    },
  ],
}

How to query it

{
  allNodeNode {
    nodes {
      title
      drupal_type
    }
  }
}