@PublicApi public static class GraphQLFieldDefinition.Builder extends java.lang.Object
Constructor and Description |
---|
Builder() |
Builder(GraphQLFieldDefinition existing) |
public Builder()
public Builder(GraphQLFieldDefinition existing)
public GraphQLFieldDefinition.Builder name(java.lang.String name)
public GraphQLFieldDefinition.Builder definition(FieldDefinition definition)
public GraphQLFieldDefinition.Builder description(java.lang.String description)
public GraphQLFieldDefinition.Builder type(GraphQLObjectType.Builder builder)
public GraphQLFieldDefinition.Builder type(GraphQLInterfaceType.Builder builder)
public GraphQLFieldDefinition.Builder type(GraphQLUnionType.Builder builder)
public GraphQLFieldDefinition.Builder type(GraphQLOutputType type)
public GraphQLFieldDefinition.Builder dataFetcher(DataFetcher<?> dataFetcher)
DataFetcher
to use with this field.dataFetcher
- the data fetcher to usepublic GraphQLFieldDefinition.Builder dataFetcherFactory(DataFetcherFactory dataFetcherFactory)
DataFetcherFactory
to use with this field.dataFetcherFactory
- the factory to usepublic GraphQLFieldDefinition.Builder staticValue(java.lang.Object value)
value
- the value to always returnpublic GraphQLFieldDefinition.Builder argument(GraphQLArgument argument)
public GraphQLFieldDefinition.Builder argument(java.util.function.UnaryOperator<GraphQLArgument.Builder> builderFunction)
argument(a -> a.name("argumentName"))
builderFunction
- a supplier for the builder implpublic GraphQLFieldDefinition.Builder argument(GraphQLArgument.Builder builder)
builder
- an un-built/incomplete GraphQLArgumentpublic GraphQLFieldDefinition.Builder argument(java.util.List<GraphQLArgument> arguments)
public GraphQLFieldDefinition.Builder clearArguments()
public GraphQLFieldDefinition.Builder deprecate(java.lang.String deprecationReason)
public GraphQLFieldDefinition.Builder withDirectives(GraphQLDirective... directives)
public GraphQLFieldDefinition.Builder withDirective(GraphQLDirective directive)
public GraphQLFieldDefinition.Builder withDirective(GraphQLDirective.Builder builder)
public GraphQLFieldDefinition.Builder clearDirectives()
public GraphQLFieldDefinition build()