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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the response with the transformedExecutionResult.protected abstract Rbuild(R original, ExecutionResult newResult) Subclasses to create the specific response instance.Set thedataof the GraphQL execution result.errors(List<GraphQLError> errors) Set theerrorsof the GraphQL execution result.extensions(Map<Object, Object> extensions) Set theextensionsof the GraphQL execution result.
-
Constructor Details
-
Builder
-
-
Method Details
-
data
Set thedataof the GraphQL execution result.- Parameters:
data- the execution result data- Returns:
- the current builder
-
errors
Set theerrorsof 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 theextensionsof 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.
-