I'm trying to set up a component of my portfolio that lists all my projects next to a fluid image (gif) of them working. I made this page before in gatsby v2 using this exact code. However, graphql playground is saying that it's unable to query field "fluid". I've never had this issue, before and I'm very confused. I've loaded gatsby image into my config. And I'm loading gatsby image into the component. Does anyone know how to fix this issue?
import React from "react"
import { Link, useStaticQuery, graphql } from "gatsby"
import projectStyles from "../styles/projects.module.scss"
import Img from "gatsby-image"
const Project = () => {
const data = useStaticQuery(graphql`
query {
allContentfulProject(sort: { fields: publishedDate, order: DESC } ) {
edges {
node {
title
slug
logline
stackList
publishedDate (formatString:"YYYY")
code
liveLink
image {
title
fluid(maxWidth:450) {
sizes
src
srcSet
srcWebp
srcSetWebp
...GatsbyContentfulFluid
}
}
}
}
}
}
`)
console.log(data)
return (
<section>
<ol className={projectStyles.posts}>
{data.allContentfulProject.edges.map((edge) => {
return (
<li className={projectStyles.post}>
<div className={projectStyles.previewImage}>
<Img
fluid={edge.node.image.fluid}
alt={edge.node.image.title}
/>
</div>
<div className={projectStyles.info}>
<p>{edge.node.publishedDate}</p>
<div className={projectStyles.headline}>
<h2>{edge.node.title}: <h3>{edge.node.logline}</h3></h2>
</div>
<p>{edge.node.stackList}</p>
<div className={projectStyles.buttons}>
<Link to={`${edge.node.code}`} class={projectStyles.button}>Code</Link>
<div class={projectStyles.divider}></div>
<Link to={`${edge.node.liveLink}`} class={projectStyles.button}>Live</Link>
</div>
</div>
</li>
)
})}
</ol>
</section>
)
}
export default Project