Package graphql.schema
Class GraphQLInterfaceType.Builder
- java.lang.Object
-
- graphql.schema.GraphqlTypeBuilder<BASE>
-
- 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 Constructor Description Builder()
Builder(GraphQLInterfaceType 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(GraphQLInterfaceType existing)
-
-
Method Detail
-
definition
public GraphQLInterfaceType.Builder definition(InterfaceTypeDefinition definition)
-
extensionDefinitions
public GraphQLInterfaceType.Builder extensionDefinitions(java.util.List<InterfaceTypeExtensionDefinition> extensionDefinitions)
-
field
public GraphQLInterfaceType.Builder field(GraphQLFieldDefinition fieldDefinition)
-
field
public GraphQLInterfaceType.Builder field(java.util.function.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
public GraphQLInterfaceType.Builder field(GraphQLFieldDefinition.Builder builder)
Same effect as the field(GraphQLFieldDefinition). Builder.build() is called from within- Parameters:
builder
- an un-built/incomplete GraphQLFieldDefinition- Returns:
- this
-
fields
public GraphQLInterfaceType.Builder fields(java.util.List<GraphQLFieldDefinition> fieldDefinitions)
-
replaceFields
public GraphQLInterfaceType.Builder replaceFields(java.util.List<GraphQLFieldDefinition> fieldDefinitions)
-
hasField
public boolean hasField(java.lang.String fieldName)
-
clearFields
public GraphQLInterfaceType.Builder 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
public GraphQLInterfaceType.Builder replaceInterfaces(java.util.List<GraphQLInterfaceType> interfaces)
-
replaceInterfacesOrReferences
public GraphQLInterfaceType.Builder replaceInterfacesOrReferences(java.util.List<? extends GraphQLNamedOutputType> interfacesOrReferences)
-
withInterface
public GraphQLInterfaceType.Builder withInterface(GraphQLInterfaceType interfaceType)
-
withInterface
public GraphQLInterfaceType.Builder withInterface(GraphQLTypeReference reference)
-
withInterfaces
public GraphQLInterfaceType.Builder withInterfaces(GraphQLInterfaceType... interfaceType)
-
withInterfaces
public GraphQLInterfaceType.Builder withInterfaces(GraphQLTypeReference... references)
-
replaceDirectives
public GraphQLInterfaceType.Builder replaceDirectives(java.util.List<GraphQLDirective> directives)
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.Builder>
- Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
public GraphQLInterfaceType.Builder withDirectives(GraphQLDirective... directives)
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.Builder>
- Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
public GraphQLInterfaceType.Builder withDirective(GraphQLDirective directive)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.Builder>
- Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
public GraphQLInterfaceType.Builder withDirective(GraphQLDirective.Builder builder)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInterfaceType.Builder,GraphQLInterfaceType.Builder>
- Parameters:
builder
- the directive builder- Returns:
- this builder
-
clearDirectives
public GraphQLInterfaceType.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
public GraphQLInterfaceType.Builder name(java.lang.String name)
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLInterfaceType.Builder>
-
description
public GraphQLInterfaceType.Builder description(java.lang.String description)
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLInterfaceType.Builder>
-
build
public GraphQLInterfaceType build()
-
-