我正在使用带有graphql-spqr的spring-boot。GraphQL 查询和突变工作。但是 GraphiQL webfrontend 没有在最右边一列的“文档资源管理器”中显示架构。为什么?
我的 graphql 控制器
@RestController
public class LiquidoGraphQLController {
private final GraphQL graphQL;
@Autowired
public LiquidoGraphQLController(
TeamsGraphQL teamsGraphQL, // my graphQL service classes
PollsGraphQL pollsGraphQL,
UserGraphQL userGraphQL
) {
// Automatically create GraphQL Schema from graphql-spqr annotations
GraphQLSchema schema = new GraphQLSchemaGenerator()
.withBasePackages("org.doogie.liquido")
.withOperationsFromSingleton(teamsGraphQL, TeamsGraphQL.class)
.withOperationsFromSingleton(pollsGraphQL, PollsGraphQL.class)
.withOperationsFromSingleton(userGraphQL, UserGraphQL.class)
.withOutputConverters()
.generate();
this.graphQL = new GraphQL.Builder(schema).build();
}
}