Package graphql.schema
Class GraphQLArgument.Builder
java.lang.Object
graphql.schema.GraphqlTypeBuilder<GraphQLArgument.Builder>
graphql.schema.GraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.Builder>
graphql.schema.GraphQLArgument.Builder
- Enclosing class:
GraphQLArgument
public static class GraphQLArgument.Builder
extends GraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.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()
Removes the defaultValue to represent a missing default value (which is different from null)This is used to clear all the directives in the builder so far.Deprecated.defaultValue
(Object defaultValue) Deprecated.defaultValueLiteral
(@NonNull Value defaultValue) defaultValueProgrammatic
(@Nullable Object defaultValue) definition
(InputValueDefinition definition) description
(String description) replaceDirectives
(List<GraphQLDirective> directives) type
(GraphQLInputType type) Deprecated.valueLiteral
(@NonNull Value value) Deprecated.useGraphQLAppliedDirectiveArgument
methods insteadvalueProgrammatic
(@Nullable Object value) Deprecated.useGraphQLAppliedDirectiveArgument
methods insteadwithDirective
(GraphQLDirective directive) withDirective
(GraphQLDirective.Builder builder) withDirectives
(GraphQLDirective... directives) 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
-
deprecate
-
type
-
defaultValue
Deprecated.A legacy method that sets a default value into the argument- Parameters:
defaultValue
- a default value- Returns:
- this builder
-
defaultValueLiteral
- Parameters:
defaultValue
- can't be null as a `null` is represented a @NullValue
Literal- Returns:
- this builder
-
defaultValueProgrammatic
- Parameters:
defaultValue
- Can be null to represent null value- Returns:
- this builder
-
clearDefaultValue
Removes the defaultValue to represent a missing default value (which is different from null)- Returns:
- this builder
-
value
Deprecated.A legacy method for setting an arguments value- Parameters:
value
- the argument value- Returns:
- this builder
-
valueLiteral
Deprecated.useGraphQLAppliedDirectiveArgument
methods insteadSets a literal AST value as the arguments value- Parameters:
value
- can't be null as a `null` is represented a @NullValue
Literal- Returns:
- this builder
-
valueProgrammatic
@Deprecated(since="2022-02-24") public GraphQLArgument.Builder valueProgrammatic(@Nullable Object value) Deprecated.useGraphQLAppliedDirectiveArgument
methods instead- Parameters:
value
- values can be null to represent null value- Returns:
- this builder
-
clearValue
Deprecated.useGraphQLAppliedDirectiveArgument
methods insteadRemoves the value to represent a missing value (which is different from null)- Returns:
- this builder
-
replaceDirectives
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,
GraphQLArgument.Builder> - Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,
GraphQLArgument.Builder> - Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,
GraphQLArgument.Builder> - Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,
GraphQLArgument.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<GraphQLArgument.Builder,
GraphQLArgument.Builder> - Returns:
- the builder
-
name
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLArgument.Builder>
-
description
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLArgument.Builder>
-
build
-
GraphQLAppliedDirectiveArgument
methods instead