0.4.3 • Published 4 years ago

gatsby-source-sylius v0.4.3

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

gatsby-source-sylius

A Gatsby source plugin for sourcing data from Sylius via the ShopApiPlugin.

Install

npm install --save gatsby-source-sylius

How to use

// In your gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-sylius`,
      options: {
        syliusUrl: `https://{{your-sylius-url}}`,
        mainTaxonCode: `category`,
      },
    },
  ],
};

Options

syliusUrl

The url to your Sylius shop

attributeDefinitions

If you want to access Attributes, you need to declare the associated GraphQL types.

For example :

// In gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-sylius`,
      options: {
        syliusUrl: `https://{{sylius-url}}`,
        mainTaxonCode: `category`,
        attributeDefinitions: `
          type Attributes {
            photographer: String
            unsplash_url: String
          }
        `,
      },
    },
  ],
};

Thoses types will be included direcly in the schema, so you can declare complex types if needed.

License

MIT

0.4.3

4 years ago

0.4.1

4 years ago

0.4.2

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago