gpt4 book ai didi

filter - graphql where filter - "Unknown argument\"where\"

转载 作者:行者123 更新时间:2023-12-05 05:39:13 41 4
gpt4 key购买 nike

我尝试在 graphql 查询中使用 where: filter 但不幸的是我遇到了一些错误。我做错了什么?

shoeposts {
data {
attributes(where: {slug: "NikeDunkLow"})
{
title
slug
}
}
}}
  "error": {
"errors": [
{
"message": "Unknown argument \"where\" on field \"ShoepostEntity.attributes\".",
"locations": [
{
"line": 4,
"column": 18
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Unknown argument \"where\" on field ```

Thanks in advance

最佳答案

看起来你正在使用 Strapi

你应该使用过滤器而不是where。并且你应该告知有条件的

and, or, not, eq, qei, ne, startsWith, endsWith, contains, notContains, containsi, notContainsi, gt, gte, lt, lte, null, notNull,in, notIn, between

shoeposts {
data {
attributes(filters: {slug: { eq: "NikeDunkLow" }})
{
title
slug
}
}
}}

关于filter - graphql where filter - "Unknown argument\"where\",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72757670/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com