moltin / gatsby-source-moltin

🚀 Gatsby source plugin for building Elastic Path Commerce Cloud powered eCommerce websites
https://www.gatsbyjs.org/packages/@moltin/gatsby-source-moltin
MIT License
21 stars 4 forks source link

feat: Add product links to category resource #10

Closed ynnoj closed 5 years ago

ynnoj commented 5 years ago

This PR adds a products field to the category type, with links to the existing product nodes. This permits usage of gatsby-image when rendering product images from a specific category.

query {
  allMoltinCategory {
    edges {
      node {
        name
        id
    products {
          id
          name
          mainImage {
            childImageSharp {
              fluid {
                src
              }
            }
          }
        }        
      }
    }
  }
}
ynnoj commented 5 years ago

Probably need to start abstracting some of this before we begin adding more resources.

Will address in additional work. This is good to go to unlock demo work ✅

ynnoj commented 5 years ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: