angeloashmore / gatsby-source-shopify

Source plugin for pulling product data into Gatsby from a Shopify store
36 stars 19 forks source link

Cannot query field "localFile" #13

Open sovanjana opened 6 years ago

sovanjana commented 6 years ago

Graphql query -

allShopifyProduct {
    edges {
      node {
        id
        images {
          id
          originalSrc
          localFile {
            childImageSharp {
              resolutions(width: 500, height: 300) {
                ...GatsbyImageSharpResolutions_withWebp
              }
            }
          }
        }
      }
    }
  }

gatsby-config.js

plugins: [
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-shopify`,
      options: {
        shopName: `xxxxxxxxxxxx`,
        accessToken: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/pages`,
        name: 'pages',
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/asset/img`,
      }
    },  ]

Error I get -

GraphQL Error Unknown field `localFile` on type `[images_2]`

gatsby-image , gatsby-source-filesystem, gatsby-source-shopify and other require dependencies are installed correctly.

@angeloashmore