Search code examples
shopifygatsby

Gatsby source shopify


I'm developing a headless commerce app for a client with Gatsby and Shopify. The situation is we're having a couple of collections and inside each collection, there will be a list of products. But at the time of querying, I'm only getting the option to query allShopifyProducts. Unable to query for collections.

Please see the attach image

Gatsby Source Shopify plugin receives 2 required parameters password and storeUrl. I put the Admin API access token as a value for a password which makes the building process works with no errors. But with all that I'm unable to get the queries for Collections. Is there any way around it? I've been searching for 7 hours, but am unable to get the appropriate result


Solution

  • The README at https://www.gatsbyjs.com/plugins/gatsby-source-shopify/ states:

    Add the following under the Active Permissions for this App section: Read access for Product listings if you enable collections in the plugin options

    And then under the plugin options itself:

    shopifyConnections: string[]

    An optional array of additional data types to source. Accepted values: 'orders', 'collections', 'locations'

    The documentation is not outdated.