Skip to content
Discussion options

You must be logged in to vote

Hi Alexey,
I think you might need to try querying a localFile object. For the Gatsby 100 Days of Code challenge with Contentful I had something like this:

export const query = graphql`
  query LocationTemplateQuery($id: String) {
    site {
      ...SEOFragment
    }
    contentfulLocation(id: { eq: $id }) {
      bannerImage {
        localFile {
          childImageSharp {
            gatsbyImageData(
              width: 1984
              layout: CONSTRAINED
              sizes: "(max-width: 480px) 480px, (max-width: 768px) 768px, 992px"
            )
          }
        }
      }
    }

(see this repo for more context)

Can you adapt this query for you case, to something like:

query a…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@oleksii-lukin
Comment options

@rodneylab
Comment options

@k31tha
Comment options

@oleksii-lukin
Comment options

@oleksii-lukin
Comment options

Answer selected by oleksii-lukin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants