use of graphql.execution.batched.BatchedExecutionStrategy in project graphql-java by graphql-java.
the class BatchCompare method batchedRun.
void batchedRun() {
System.out.println("=== BatchedExecutionStrategy ===");
GraphQLSchema schema = buildBatchedSchema();
GraphQL graphQL = GraphQL.newGraphQL(schema).queryExecutionStrategy(new BatchedExecutionStrategy()).build();
ExecutionInput executionInput = ExecutionInput.newExecutionInput().query("query { shops { id name departments { id name products { id name } } } }").build();
ExecutionResult result = graphQL.execute(executionInput);
System.out.println("\nExecutionResult: " + result.toSpecification());
}
Aggregations