我正在尝试按其类别、uid 列出一组文章,并且我假设我必须使用该where
查询,但我无法将其用于链接文档。
问题似乎是where
只接受字段上的字符串,但在链接文档的情况下,您需要深入挖掘 uid 字段。
我不确定我是否使用了错误的查询,但很难在文档中找到任何内容来帮助我。
我尝试深入研究类别对象:
{
allDirectoryServices(
where: { category: { _meta: { uid: "developers" } } }
) {
edges {
node {
name
city
region
country
category {
...on DirectoryTaxonomy {
_meta {
uid
}
name
}
}
}
}
}
}
但这会返回一个错误,它需要一个字符串:
"message": "Expected type String, found {_meta: {uid: \"developers\"}}.",
{
allDirectoryServices(
where: { category: "developers"}
) {
edges {
node {
name
city
region
country
category {
...on DirectoryTaxonomy {
_meta {
uid
}
name
}
}
}
}
}
}
显然,这不会返回任何结果。