Class DefaultExecutionGraphQlResponse.Builder<B extends DefaultExecutionGraphQlResponse.Builder<B,R>,R extends ExecutionGraphQlResponse>
java.lang.Object
org.springframework.graphql.support.DefaultExecutionGraphQlResponse.Builder<B,R>
- Direct Known Subclasses:
RSocketGraphQlResponse.Builder
,WebGraphQlResponse.Builder
- Enclosing class:
- DefaultExecutionGraphQlResponse
public abstract static class DefaultExecutionGraphQlResponse.Builder<B extends DefaultExecutionGraphQlResponse.Builder<B,R>,R extends ExecutionGraphQlResponse>
extends Object
Builder to transform the response's
ExecutionResult
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the response with the transformedExecutionResult
.protected abstract R
build
(R original, ExecutionResult newResult) Subclasses to create the specific response instance.Set thedata
of the GraphQL execution result.errors
(List<GraphQLError> errors) Set theerrors
of the GraphQL execution result.extensions
(Map<Object, Object> extensions) Set theextensions
of the GraphQL execution result.
-
Constructor Details
-
Builder
-
-
Method Details
-
data
Set thedata
of the GraphQL execution result.- Parameters:
data
- the execution result data- Returns:
- the current builder
-
errors
Set theerrors
of the GraphQL execution result.- Parameters:
errors
- the execution result errors- Returns:
- the current builder
-
extensions
public DefaultExecutionGraphQlResponse.Builder<B,R> extensions(@Nullable Map<Object, Object> extensions) Set theextensions
of the GraphQL execution result.- Parameters:
extensions
- the execution result extensions- Returns:
- the current builder
-
build
Build the response with the transformedExecutionResult
. -
build
Subclasses to create the specific response instance.
-