Package graphql.schema
Class GraphQLArgument.Builder
- java.lang.Object
-
- graphql.schema.GraphqlTypeBuilder<BASE>
-
- 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 Constructor Description Builder()
Builder(GraphQLArgument 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(GraphQLArgument existing)
-
-
Method Detail
-
definition
public GraphQLArgument.Builder definition(InputValueDefinition definition)
-
deprecate
public GraphQLArgument.Builder deprecate(java.lang.String deprecationReason)
-
type
public GraphQLArgument.Builder type(GraphQLInputType type)
-
defaultValue
@Deprecated(since="2021-05-10") public GraphQLArgument.Builder defaultValue(java.lang.Object defaultValue)
Deprecated.A legacy method that sets a default value into the argument- Parameters:
defaultValue
- a default value- Returns:
- this builder
-
defaultValueLiteral
public GraphQLArgument.Builder defaultValueLiteral(@NotNull @NotNull Value defaultValue)
- Parameters:
defaultValue
- can't be null as a `null` is represented a @NullValue
Literal- Returns:
- this builder
-
defaultValueProgrammatic
public GraphQLArgument.Builder defaultValueProgrammatic(@Nullable @Nullable java.lang.Object defaultValue)
- Parameters:
defaultValue
- Can be null to represent null value- Returns:
- this builder
-
clearDefaultValue
public GraphQLArgument.Builder clearDefaultValue()
Removes the defaultValue to represent a missing default value (which is different from null)- Returns:
- this builder
-
value
@Deprecated(since="2021-05-10") public GraphQLArgument.Builder value(@Nullable @Nullable java.lang.Object value)
Deprecated.A legacy method for setting an arguments value- Parameters:
value
- the argument value- Returns:
- this builder
-
valueLiteral
@Deprecated(since="2022-02-24") public GraphQLArgument.Builder valueLiteral(@NotNull @NotNull Value value)
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 @Nullable java.lang.Object value)
Deprecated.useGraphQLAppliedDirectiveArgument
methods instead- Parameters:
value
- values can be null to represent null value- Returns:
- this builder
-
clearValue
@Deprecated(since="2022-02-24") public GraphQLArgument.Builder clearValue()
Deprecated.useGraphQLAppliedDirectiveArgument
methods insteadRemoves the value to represent a missing value (which is different from null)- Returns:
- this builder
-
replaceDirectives
public GraphQLArgument.Builder replaceDirectives(java.util.List<GraphQLDirective> directives)
- Overrides:
replaceDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.Builder>
- Parameters:
directives
- the list of directives- Returns:
- this builder
-
withDirectives
public GraphQLArgument.Builder withDirectives(GraphQLDirective... directives)
- Overrides:
withDirectives
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.Builder>
- Parameters:
directives
- the variable args of directives- Returns:
- this builder
-
withDirective
public GraphQLArgument.Builder withDirective(GraphQLDirective directive)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.Builder>
- Parameters:
directive
- the directive to add- Returns:
- this builder
-
withDirective
public GraphQLArgument.Builder withDirective(GraphQLDirective.Builder builder)
- Overrides:
withDirective
in classGraphqlDirectivesContainerTypeBuilder<GraphQLArgument.Builder,GraphQLArgument.Builder>
- Parameters:
builder
- the directive builder- Returns:
- this builder
-
clearDirectives
public GraphQLArgument.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
public GraphQLArgument.Builder name(java.lang.String name)
- Overrides:
name
in classGraphqlTypeBuilder<GraphQLArgument.Builder>
-
description
public GraphQLArgument.Builder description(java.lang.String description)
- Overrides:
description
in classGraphqlTypeBuilder<GraphQLArgument.Builder>
-
build
public GraphQLArgument build()
-
-