【发布时间】:2021-05-21 04:13:15
【问题描述】:
我有一个具有以下架构的 Postgres 数据库:
“article_id”类型:文本
“推荐”类型:文本[]
示例行如下所示:
“xxxx1”,[“xxxx2”,“xxxx3”,“xxxx5”]
现在在 Hasura 中,我可以过滤关于 article_id 的推荐,例如:
query get_recommendations {
recommendations(limit: 10, where: {article_id: {_eq: "xxxx1"}}) {
recommendations
}
}
这会给我 ["xxxx2", "xxxx3", "xxxx5"]
但是我将如何从推荐数组中过滤特定的推荐?
基本上我想获得关于article_id“xxxx1”的推荐,而不是推荐“xxxx3”。
结果应该是 ["xxxx2", "xxxx5"]。
我在 Hasura 中尝试了所有过滤器组合,但这似乎不可能?你能帮帮我吗?
【问题讨论】: