Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Graphql 使用嵌套变量筛选Apollo连接_Graphql_Apollo_React Apollo - Fatal编程技术网

Graphql 使用嵌套变量筛选Apollo连接

Graphql 使用嵌套变量筛选Apollo连接,graphql,apollo,react-apollo,Graphql,Apollo,React Apollo,我想为我的@connection指令指定一个嵌套参数作为过滤器。是否可以这样做: input CommentsInput { postId: String! cursors: CommentsCursorInput } query getComments($input: CommentInput) { getComments(input: $input) @connection(key: "comments", filter: ["input.postId"]) {

我想为我的
@connection
指令指定一个嵌套参数作为
过滤器。是否可以这样做:

input CommentsInput {
  postId: String!
  cursors: CommentsCursorInput
}

query getComments($input: CommentInput) {
    getComments(input: $input)
    @connection(key: "comments", filter: ["input.postId"]) {
        comments {
            id
            commentBody
            createdDate
            liked
            likeCount
        }
    }
}
postId
传入
input
。这是一个精心设计的示例,我知道我可以用不同的结构,但我的主要问题是我可以使用嵌套参数作为过滤器,还是只能在
过滤器
数组中使用顶级参数?我没有看到任何关于这个的讨论