@webriq/gatsby-source-ecwid

2.0.2 • Public • Published

@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

Dependents (0)

Package Sidebar

Install

npm i @webriq/gatsby-source-ecwid

Weekly Downloads

0

Version

2.0.2

License

MIT

Unpacked Size

4.18 kB

Total Files

4

Last publish

Collaborators

  • webriq