1

这是我在视觉中所做的

*[_type == "post" && categories == SOCIAL ]{
  _id, title
}

它回来了

No documents found in dataset production that match query:


*[_type == "post" && categories == SOCIAL ]{
  _id, title
}
4

1 回答 1

0

你必须像这样格式化它:

*[_type == "post" && categories == "SOCIAL" in categories[]->title]{
  title,
  slug,
  body
}

如果没有显示,则没有与该类别相关的帖子。类别也区分大小写,因此请确保您的大小写正确。

于 2021-12-20T03:19:32.423 回答