【发布时间】:2020-09-19 02:29:49
【问题描述】:
我正在探索 graphql,并按照本教程 https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/ 运行服务器。我现在正在尝试使用这个库为这个服务器编写一个 Java 客户端:https://github.com/apollographql/apollo-android。到目前为止,我的代码是:https://github.com/alampada/graphql-java-client-tutorial,自述文件包括重现步骤。
我无法让 apollo 客户端库为我的查询生成模型:https://github.com/alampada/graphql-java-client-tutorial/blob/master/src/main/graphql/com/example/book.graphql,因为 ./gradlew generateApolloSources 失败:
Can't query `Book` on type `Query`
----------------------------------------------------
[1]:query BookQuery($id: ID!) {
[2]: Book (id: $id) {
[3]: id
----------------------------------------------------
谁能解释我做错了什么?
【问题讨论】:
标签: java graphql apollo-android