Spring Boot GraphQL GraphQlTester

Spring Boot GraphQL provides a dedicated spring-graphql-test artifact that provides a GraphQlTester interface, the GraphQlTester interface provides dedicated Inner Interfaces that help in API execution and response.

Flow                
HTTP request GraphQlHttpHandler WebGraphQlHandler ExecutionGraphQlService GraphQL Java

Spring Boot GraphQL provides a respective Interface for testing each layer of execution.

Interface Details
HttpGraphQlTester Test GraphQL API over the HTTP layer
WebSocketGraphQlTester Test GraphQL WebSocket API using WebSocketClient.
ExecutionGraphQlServiceTester GraphQlTester executes requests through an ExecutionGraphQlService on the server side, without a client.
WebGraphQlTester To test the GraphQL service without using a GrahphQL client.

Each of the above Inner Interfaces will be used to create an instance of GraphQlTester.

follow us on