【发布时间】:2022-07-25 18:58:56
【问题描述】:
我使用 .NET 6 在 Orchard Core Cms 上开始了我的项目。当我尝试在 Orchard Core 上的 GraphiQL 工具上执行 graphql 查询时,它不显示我添加到 ProductCategory 内容项字段中的字段“描述” 查询如下:
query MyQuery {
productCategory {
id
description
bag {
contentItems {
... on ProductCategory {
description
bag {
contentItems {
... on ProductCategory {
id
description
displayText
}
}
}
}
}
}
}
}
响应如下:
{
"data": {
"productCategory": [
{
"id": 1,
"description": "Product Category 1 Description",
"bag": {
"contentItems": [
{
"bag": {
"contentItems": [
{
"id": 15,
// description field is absent
"displayText": "Product Category 3"
}
]
}
}
]
}
}
]
}
}
ProductCategory 内容类型有两个字段:Id 和 Description 并享有 Title、Flow、Bag、Alias 部分。此外,该内容类型可以是 ProductCategory 内容类型的包。正如在代码中可见,第一项显示 description 字段,但子项忽略它
【问题讨论】:
标签: graphql orchardcms