Tag: graphql-spqr
-
Handling Exceptions not working with SPQR (graphql)
0 I am having an issue in configuring exception handling with this. I went through all the issues/examples and found some solutions. But don’t know that is not working. See, here is how I configured my graphQL @Autowired public GraphqlController(BookResolver bookResolver) { GraphQLSchema schema = new GraphQLSchemaGenerator() .withBasePackages("com.graphql.learn") .withOperationsFromSingleton(bookResolver) .generate(); this.graphQL = new GraphQL.Builder(schema) .queryExecutionStrategy(new…
-
Generate API documentation using spring boot graphql spqr library
0 We are using Spring boot grphql sqpr library. We have to generate graphql API documentation which can be viewed in graphiql. For e.g. If i have field like below # comma separated location IDs. (eg: ‘5,12,27’) locationIds: String then this string comma separated location IDs. (eg: ‘5,12,27’) should be visible in graphiql. graphql graphql-spqr…
-
How to solve N+1 problem using leangen/graphql-spqr
0 Suppose I have below query method defined, Lets say getAllBooks returns 10 books, now if we query for price too, price method will be called multiple times (10 times in this case). How can I batch the call to price method. @GraphQLQuery(name = "getAllBooks", description = "Get all books") public List<Book> getAllBooks() { return…
-
Dynamically restrict fields in graphql spring methods returning the same object type
0 Would it be possible to somehow restrict some fields from being returned in a graph ql method, bur return them in another considering they both return the same object ? For example in the following methods i would like to restrict the field UserDto.birthday from being able to be queried in the second method.…