Class WebGraphQlResponse

All Implemented Interfaces:
ExecutionGraphQlResponse, GraphQlResponse

public class WebGraphQlResponse extends DefaultExecutionGraphQlResponse
GraphQlResponse implementation for server handling over HTTP or over WebSocket.
Since:
1.0.0
Author:
Rossen Stoyanchev
  • Constructor Details

  • Method Details

    • getResponseHeaders

      public HttpHeaders getResponseHeaders()
      Return the headers to be added to the HTTP response.

      By default, this is empty.

      Note: This is for use with GraphQL over HTTP requests but not for GraphQL over WebSocket where the initial handshake HTTP request completes before queries begin.

    • transform

      Transform the underlying ExecutionResult through a WebGraphQlResponse.Builder and return a new instance with the modified values.
      Parameters:
      consumer - callback to transform the result
      Returns:
      the new response instance with the mutated ExecutionResult