| Modifier and Type | Method and Description |
|---|---|
WebOutput |
build() |
WebOutput.Builder |
data(java.lang.Object data)
Set the
data of the GraphQL execution result. |
WebOutput.Builder |
errors(java.util.List<graphql.GraphQLError> errors)
Set the
errors of the GraphQL execution
result. |
WebOutput.Builder |
extensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)
Set the
extensions of the GraphQL
execution result. |
WebOutput.Builder |
responseHeader(java.lang.String name,
java.lang.String... values)
Add a custom header to be set on the HTTP response.
|
WebOutput.Builder |
responseHeaders(java.util.function.Consumer<org.springframework.http.HttpHeaders> consumer)
Consume and update the headers to be set on the HTTP response.
|
public WebOutput.Builder data(@Nullable java.lang.Object data)
data of the GraphQL execution result.data - the execution result datapublic WebOutput.Builder errors(@Nullable java.util.List<graphql.GraphQLError> errors)
errors of the GraphQL execution
result.errors - the execution result errorspublic WebOutput.Builder extensions(@Nullable java.util.Map<java.lang.Object,java.lang.Object> extensions)
extensions of the GraphQL
execution result.extensions - the execution result extensionspublic WebOutput.Builder responseHeader(java.lang.String name, java.lang.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(java.util.function.Consumer<org.springframework.http.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()