I am using spring-boot with graphql-spqr. GraphQL queries and mutations work. But the GraphiQL webfrontend does not show the schema in the "documentatin explorer" in the rightmost column. Why?
My graphql Controller
@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();
}
}
GraphiQL shows the "schmea", but doesn't show anything in the documentation tab.
Thank you for the tips. After some debuggin I found out, that in my Custom GraphQL Controller I directly returned the graphQL data, instead of the
ExecutionResult
with data: {}, errors: []