我的Graph QL遇到了一些问题,希望有人可以帮忙(是的,我已经在Google中广泛搜索并修复了该错误的一部分)
My app is saying the query is wrong and the expected is the same query that is wrong. I think it is how the query is structured.
const useBlogPosts = () => {
const data = useStaticQuery(
graphql`
query {
allContentfulContentType(sort: { order: DESC, fields: ContentfulContentTypeFieldsEnum}) {
edges {
node {
title
author {
name
}
ContentfulContentTypeFieldsEnum
body {
childMarkdownRemark {
html
}
}
heroImage {
fluid(maxWidth: 960) {
...GatsbyContentfulFluid_withWebp
}
}
}
}
}
}
`
);
return data;
};