@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",
          EcwidCategories: "/categories",
        },
        limit: 30
      },
    }
  ],

How to query

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

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