Docs outdated? #30652
-
https://www.gatsbyjs.com/plugins/gatsby-plugin-image Docs saying query should be like this: query {
blogPost(id: { eq: $Id }) {
title
body
avatar {
childImageSharp {
gatsbyImageData(width: 200)
}
}
}
} but that was throwing me an error while what worked for me looks like this {
file(relativePath: {eq: "shared/glasses-image.png"}) {
childImageSharp {
gatsbyImage(layout: FLUID, maxWidth: 664) {
imageData
}
}
}
} Am I using something different, or docs have outdated information? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
The two example queries you posted here are two completely separate things. The first one assumes that you have a |
Beta Was this translation helpful? Give feedback.
The two example queries you posted here are two completely separate things. The first one assumes that you have a
blogPost
type with anavatar
pointing to an image. If you don't have that in your local project then it won't work. It's an example explaining the query, not necessarily good to copy/paste into an existing project.