Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

@webriq/gatsby-source-ecwid

Gatsby source plugin for fetching api in ecwid

Install

yarn add @webriq/gatsby-source-ecwid

How to use

// In your gatsby-config.js
plugins: [
    {
      resolve: "@webriq/gatsby-source-ecwid",
      options: {
        storeId: "...",
        token: "...",
        endpoints: {
          EcwidProducts: "/products?limit=100&enbled=true&baseUrl=/&cleanUrls=true",
          EcwidCategories: "/categories?enabled=true&baseUrl=/&cleanUrls=true&hidden_categories=true",
        }
      },
    }
  ],

How to query

You can query Document nodes created from your Ecwid API like the following:

{
  allEcwidProducts {
    nodes {
      id
      name
      price
      description
      imageUrl
    }
  }
}

API Parameters

For more ecwid api parameters visit https://api-docs.ecwid.com/reference/rest-api

© 2023 Gatsby, Inc.