Package graphql.schema
Class GraphQLInputObjectType.Builder
- java.lang.Object
-
- graphql.schema.GraphqlTypeBuilder<BASE>
-
- graphql.schema.GraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
-
- graphql.schema.GraphQLInputObjectType.Builder
-
- Enclosing class:
- GraphQLInputObjectType
@PublicApi public static class GraphQLInputObjectType.Builder extends GraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.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(GraphQLInputObjectType 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(GraphQLInputObjectType existing)
-
-
Method Detail
-
definition
public GraphQLInputObjectType.Builder definition(InputObjectTypeDefinition definition)
-
extensionDefinitions
public GraphQLInputObjectType.Builder extensionDefinitions(java.util.List<InputObjectTypeExtensionDefinition> extensionDefinitions)
-
field
public GraphQLInputObjectType.Builder field(GraphQLInputObjectField field)
-
field
public GraphQLInputObjectType.Builder field(java.util.function.UnaryOperator<GraphQLInputObjectField.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 GraphQLInputObjectType.Builder field(GraphQLInputObjectField.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 GraphQLInputObjectType.Builder fields(java.util.List<GraphQLInputObjectField> fields)
-
replaceFields
public GraphQLInputObjectType.Builder replaceFields(java.util.List<GraphQLInputObjectField> fields)
-
hasField
public boolean hasField(java.lang.String fieldName)
-
clearFields
public GraphQLInputObjectType.Builder clearFields()
This is used to clear all the fields in the builder so far.- Returns:
- the builder
-
replaceDirectives
public GraphQLInputObjectType.Builder replaceDirectives(java.util.List<GraphQLDirective> directives)
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
- Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
public GraphQLInputObjectType.Builder withDirectives(GraphQLDirective... directives)
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
- Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
public GraphQLInputObjectType.Builder withDirective(GraphQLDirective directive)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
- Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
public GraphQLInputObjectType.Builder withDirective(GraphQLDirective.Builder builder)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
- Parameters:
builder
- the directive builder- Returns:
- this builder
-
clearDirectives
public GraphQLInputObjectType.Builder clearDirectives()
Description copied from class:GraphqlDirectivesContainerTypeBuilder
This is used to clear all the directives in the builder so far.- Overrides:
clearDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLInputObjectType.Builder,GraphQLInputObjectType.Builder>
- Returns:
- the builder
-
name
public GraphQLInputObjectType.Builder name(java.lang.String name)
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLInputObjectType.Builder>
-
description
public GraphQLInputObjectType.Builder description(java.lang.String description)
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLInputObjectType.Builder>
-
build
public GraphQLInputObjectType build()
-
-