Gatsby插件图QL错误-说正确的查询与错误的查询相同

时间:2020-07-14 00:32:10

标签: graph graphql gatsby

我的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;
};

0 个答案:

没有答案