Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Cannot query field "localFile" #13

Open
sovanjana opened this issue Aug 23, 2018 · 0 comments
Open

Cannot query field "localFile" #13

sovanjana opened this issue Aug 23, 2018 · 0 comments

Comments

@sovanjana
Copy link

sovanjana commented Aug 23, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant