bdelacretaz commented on code in PR #39: URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/39#discussion_r1431193880
########## src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java: ########## @@ -394,6 +417,24 @@ TypeDefinitionRegistry getTypeDefinitionRegistry(@NotNull String sdl, @NotNull R } } + private Consumer<GraphQLContext.Builder> getGraphQLContextBuilder() { + ParserOptions defaultParserOptions = ParserOptions.getDefaultParserOptions(); + Consumer<GraphQLContext.Builder> graphQLContextBuilder = builder -> { Review Comment: Can we use [ParserOptions#transform](https://javadoc.io/static/com.graphql-java/graphql-java/20.1/graphql/parser/ParserOptions.html#transform-java.util.function.Consumer-) here, for simpler code? IIUC that'd look something like ParserOptions opt = ParserOptions.getDefaultParserOptions().transform(builder -> { builder .maxTokens(queryMaxTokens) .maxWhitespaceTokens(queryMaxWhitespaceTokens) .build(); } ...untested code, just looking at the docs! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org