【发布时间】:2022-10-23 07:47:18
【问题描述】:
我有这样的架构:
type Query {
shows: [Show]
}
type Show {
id: Int
title: String
audiences(userId: [Int]): [User]
}
type User {
id: Int
name: String
}
我认为userId 只会出现在User 解析器层中,如果有办法在Show 层(User 的父层)中获得userId?
我已经阅读了这篇文章Get child args in parent in GraphQL,但我不知道如何使用 Java 来实现它。
我正在使用graphql-java 这个库。
【问题讨论】: