Skip to content

Instantly share code, notes, and snippets.

@keidarcy
Last active August 29, 2020 01:49
Show Gist options
  • Save keidarcy/676e7198583c3f8f9c47523bb29d1be1 to your computer and use it in GitHub Desktop.
Save keidarcy/676e7198583c3f8f9c47523bb29d1be1 to your computer and use it in GitHub Desktop.
Shopify GraphQL Examples

Products with Search Query

query{
    products(first: 100,  query: "tag:vans AND title:AUTHENTIC") {
        edges {
            node {
                id
                title
              tags
              hasOnlyDefaultVariant
               createdAt
                images(first:1) {
                    edges {
                        node {
                            originalSrc
                        }
                    }
                }
            }
        }
    }
}

Get a list of Collection

query getCollectionListByids{
    nodes(ids: ["gid://shopify/Collection/163081027650","gid://shopify/Collection/163081060418"]){
        ... on Collection{
            id
            title
            image {
                originalSrc
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment