Package graphql.schema
Class GraphQLUnionType.Builder
- java.lang.Object
-
- graphql.schema.GraphqlTypeBuilder<BASE>
-
- graphql.schema.GraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
-
- graphql.schema.GraphQLUnionType.Builder
-
- Enclosing class:
- GraphQLUnionType
@PublicApi public static class GraphQLUnionType.Builder extends GraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
-
-
Field Summary
-
Fields inherited from class graphql.schema.GraphqlDirectivesContainerTypeBuilder
appliedDirectives, directives
-
Fields inherited from class graphql.schema.GraphqlTypeBuilder
comparatorRegistry, description, name
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(GraphQLUnionType existing)
-
Method Summary
-
Methods inherited from class graphql.schema.GraphqlDirectivesContainerTypeBuilder
copyExistingDirectives, replaceAppliedDirectives, withAppliedDirective, withAppliedDirective, withAppliedDirectives
-
Methods inherited from class graphql.schema.GraphqlTypeBuilder
comparatorRegistry
-
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(GraphQLUnionType existing)
-
-
Method Detail
-
definition
public GraphQLUnionType.Builder definition(UnionTypeDefinition definition)
-
extensionDefinitions
public GraphQLUnionType.Builder extensionDefinitions(java.util.List<UnionTypeExtensionDefinition> extensionDefinitions)
-
typeResolver
@Deprecated(since="2018-12-03") public GraphQLUnionType.Builder typeResolver(TypeResolver typeResolver)
Deprecated.- Parameters:
typeResolver
- the type resolver- Returns:
- this builder
-
possibleType
public GraphQLUnionType.Builder possibleType(GraphQLObjectType type)
-
possibleType
public GraphQLUnionType.Builder possibleType(GraphQLTypeReference reference)
-
possibleTypes
public GraphQLUnionType.Builder possibleTypes(GraphQLObjectType... type)
-
replacePossibleTypes
public GraphQLUnionType.Builder replacePossibleTypes(java.util.List<? extends GraphQLNamedOutputType> types)
-
possibleTypes
public GraphQLUnionType.Builder possibleTypes(GraphQLTypeReference... references)
-
clearPossibleTypes
public GraphQLUnionType.Builder clearPossibleTypes()
This is used to clear all the types in the builder so far.- Returns:
- the builder
-
containType
public boolean containType(java.lang.String name)
-
replaceDirectives
public GraphQLUnionType.Builder replaceDirectives(java.util.List<GraphQLDirective> directives)
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
- Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
public GraphQLUnionType.Builder withDirectives(GraphQLDirective... directives)
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
- Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
public GraphQLUnionType.Builder withDirective(GraphQLDirective directive)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
- Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
public GraphQLUnionType.Builder withDirective(GraphQLDirective.Builder builder)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
- Parameters:
builder
- the directive builder- Returns:
- this builder
-
clearDirectives
public GraphQLUnionType.Builder clearDirectives()
Description copied from class:GraphqlDirectivesContainerTypeBuilder
This is used to clear all the directives in the builder so far.- Overrides:
clearDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLUnionType.Builder,GraphQLUnionType.Builder>
- Returns:
- the builder
-
name
public GraphQLUnionType.Builder name(java.lang.String name)
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLUnionType.Builder>
-
description
public GraphQLUnionType.Builder description(java.lang.String description)
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLUnionType.Builder>
-
build
public GraphQLUnionType build()
-
-