Package graphql.schema
Class GraphQLInterfaceType.Builder
java.lang.Object
graphql.schema.GraphqlTypeBuilder<GraphQLInterfaceType.Builder>
graphql.schema.GraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.Builder>
graphql.schema.GraphQLInterfaceType.Builder
- Enclosing class:
GraphQLInterfaceType
@PublicApi
public static class GraphQLInterfaceType.Builder
extends GraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.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 -
Method Summary
Modifier and TypeMethodDescriptionbuild()
This is used to clear all the directives in the builder so far.This is used to clear all the fields in the builder so far.definition
(InterfaceTypeDefinition definition) description
(String description) extensionDefinitions
(List<InterfaceTypeExtensionDefinition> extensionDefinitions) field
(GraphQLFieldDefinition fieldDefinition) field
(GraphQLFieldDefinition.Builder builder) Same effect as the field(GraphQLFieldDefinition).field
(UnaryOperator<GraphQLFieldDefinition.Builder> builderFunction) Take a field builder in a function definition and apply.fields
(List<GraphQLFieldDefinition> fieldDefinitions) boolean
replaceDirectives
(List<GraphQLDirective> directives) replaceFields
(List<GraphQLFieldDefinition> fieldDefinitions) replaceInterfaces
(List<GraphQLInterfaceType> interfaces) replaceInterfacesOrReferences
(List<? extends GraphQLNamedOutputType> interfacesOrReferences) typeResolver
(TypeResolver typeResolver) Deprecated.withDirective
(GraphQLDirective directive) withDirective
(GraphQLDirective.Builder builder) withDirectives
(GraphQLDirective... directives) withInterface
(GraphQLInterfaceType interfaceType) withInterface
(GraphQLTypeReference reference) withInterfaces
(GraphQLInterfaceType... interfaceType) withInterfaces
(GraphQLTypeReference... references) Methods inherited from class graphql.schema.GraphqlDirectivesContainerTypeBuilder
copyExistingDirectives, replaceAppliedDirectives, withAppliedDirective, withAppliedDirective, withAppliedDirectives
Methods inherited from class graphql.schema.GraphqlTypeBuilder
comparatorRegistry
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
definition
-
extensionDefinitions
public GraphQLInterfaceType.Builder extensionDefinitions(List<InterfaceTypeExtensionDefinition> extensionDefinitions) -
field
-
field
public GraphQLInterfaceType.Builder field(UnaryOperator<GraphQLFieldDefinition.Builder> builderFunction) Take a field builder in a function definition and apply. Can be used in a jdk8 lambda e.g.:field(f -> f.name("fieldName"))
- Parameters:
builderFunction
- a supplier for the builder impl- Returns:
- this
-
field
Same effect as the field(GraphQLFieldDefinition). Builder.build() is called from within- Parameters:
builder
- an un-built/incomplete GraphQLFieldDefinition- Returns:
- this
-
fields
-
replaceFields
-
hasField
-
clearFields
This is used to clear all the fields in the builder so far.- Returns:
- the builder
-
typeResolver
@Deprecated(since="2018-12-03") public GraphQLInterfaceType.Builder typeResolver(TypeResolver typeResolver) Deprecated.- Parameters:
typeResolver
- the type resolver- Returns:
- this builder
-
replaceInterfaces
-
replaceInterfacesOrReferences
public GraphQLInterfaceType.Builder replaceInterfacesOrReferences(List<? extends GraphQLNamedOutputType> interfacesOrReferences) -
withInterface
-
withInterface
-
withInterfaces
-
withInterfaces
-
replaceDirectives
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,
GraphQLInterfaceType.Builder> - Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,
GraphQLInterfaceType.Builder> - Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,
GraphQLInterfaceType.Builder> - Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,
GraphQLInterfaceType.Builder> - Parameters:
builder
- the directive builder- Returns:
- this builder
-
clearDirectives
Description copied from class:GraphqlDirectivesContainerTypeBuilder
This is used to clear all the directives in the builder so far.- Overrides:
clearDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,
GraphQLInterfaceType.Builder> - Returns:
- the builder
-
name
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLInterfaceType.Builder>
-
description
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLInterfaceType.Builder>
-
build
-
GraphQLCodeRegistry.Builder.typeResolver(GraphQLInterfaceType, TypeResolver)
instead