Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

This plugin is used to source product data from builder.io and the checkout API.

How To publish:

npm publish --access=public

How this works:

On build:

  1. query all the productData pages that exist
  2. merge the checkout API data with the builder data to generate a productSelectorData node with the following shape:
{
  id: data.title,
  useInProduction: data.useInProduction,
  thumbnailImage: data.thumbnailImage,
  url: data.url,
  productSelector: {
    onetime: {
        products: [],
        discounts: [],
        bumpOffers: []
    },
    subscription: {
        products: [],
        discounts: [],
        bumpOffers: []
    }
  }
}

Improvement opportunities:

  • update the backend to get all prices by one request for all variants. It can make the plugin much faster
© 2023 Gatsby, Inc.