【发布时间】:2021-01-17 03:09:34
【问题描述】:
我正在关注 this 文档以从 Contentful 呈现富文本。
到目前为止,我已经安装了gatsby-source-contentful,现在我正在使用 graphQL 查询来查询富文本内容,然后再添加到我的模板中。
问题:我无法查询references 字段。
据我了解,最近有一个 breaking change 需要查询 raw 子字段...但不幸的是,我无法查询 raw 中的任何子字段。
我不确定问题可能是什么。
查询
{
allContentfulArticle {
edges {
node {
content {
raw
references {
... on ContentfulArticle {
contentful_id
title
slug
}
}
}
}
}
}
}
【问题讨论】:
-
我不明白为什么您的错误消息谈到类型“ContentfulArticleContent”,也许这是要深入研究的内容
标签: javascript content-management-system gatsby contentful richtext