| Modifier and Type | Method and Description |
|---|---|
WebOutput |
build() |
WebOutput.Builder |
data(Object data)
Set the
data of the GraphQL execution result. |
WebOutput.Builder |
errors(List<GraphQLError> errors)
Set the
errors of the GraphQL execution
result. |
WebOutput.Builder |
extensions(Map<Object,Object> extensions)
Set the
extensions of the GraphQL
execution result. |
WebOutput.Builder |
responseHeader(String name,
String... values)
Add a custom header to be set on the HTTP response.
|
WebOutput.Builder |
responseHeaders(Consumer<HttpHeaders> consumer)
Consume and update the headers to be set on the HTTP response.
|
public WebOutput.Builder data(@Nullable Object data)
data of the GraphQL execution result.data - the execution result datapublic WebOutput.Builder errors(@Nullable List<GraphQLError> errors)
errors of the GraphQL execution
result.errors - the execution result errorspublic WebOutput.Builder extensions(@Nullable Map<Object,Object> extensions)
extensions of the GraphQL
execution result.extensions - the execution result extensionspublic WebOutput.Builder responseHeader(String name, String... values)
Note: This can be used for GraphQL over HTTP requests but has no impact for queries over a WebSocket session where the initial handshake request completes before queries begin.
name - the HTTP header namevalues - the HTTP header valuespublic WebOutput.Builder responseHeaders(Consumer<HttpHeaders> consumer)
Note: This can be used for GraphQL over HTTP requests but has no impact for queries over a WebSocket session where the initial handshake request completes before queries begin.
consumer - callback that updates the HTTP headerspublic WebOutput build()