See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Sign Up for Free
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
© 2022 Gatsby, Inc.