@epicdesignlabs/gatsby-source-bigcommerce

This source plugin makes BigCommerce API data available in GatsbyJS sites. Currently in active development.

Installation

For Yarn:

yarn add @epicdesignlabs/gatsby-source-bigcommerce

For NPM:

npm install @epicdesignlabs/gatsby-source-bigcommerce

in gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: '@epicdesignlabs/gatsby-source-bigcommerce',
      options: {
        ...
      }
    }
  ]
};

Configuration options

Example configuration for a single endpoint:

options: {
  // REQUIRED
  clientId: 'YOUR_CLIENT_ID',
  secret: 'YOUR_CLIENT_SECRET',
  accessToken: 'YOUR_ACCESS_TOKEN',
  storeHash: 'YOUR_SITE_HASH',
  endpoint: '/v3/catalog/products',

  // OPTIONAL
  logLevel: 'info',
  nodeName: 'BigCommerceProducts',
}

If you want to return data from multiple endpoints, use endpoints instead. You can find a list of endpoints here.

options: {
  ...

  // Create a nodeName and map it to a BigCommerce endpoint
  endpoints: {
    BigCommerceProducts: "/v3/catalog/products",
    BigCommerceCategories: "/v2/store",
    BigCommerceBrands: "/v2/settings/storefront/seo"
  }
}

How to query

{
 allBigCommerceNode {
  edges {
   node {
    name
    price
    id
    sku
   }
  }
 }
}