Interface GraphQLFieldBuilder<Parent>
- All Known Implementing Classes:
GraphQLFieldBuilderImpl
public interface GraphQLFieldBuilder<Parent>
Builder for a field within a GraphQL object.
-
Method Summary
Modifier and Type Method Description Parent
done()
Indicate that the field is done building and that it should be added to the parent type.GraphQLArgumentBuilder<GraphQLFieldBuilder<Parent>>
newArgument()
Start building a new argument for this field.GraphQLFieldBuilder<Parent>
over(se.l4.commons.types.reflect.MemberRef member)
Set aMemberRef
this field is based on.GraphQLFieldBuilder<Parent>
setDeprecation(String deprecationReason)
Set if the field is deprecated.GraphQLFieldBuilder<Parent>
setDescription(String description)
Set the description of the field.GraphQLFieldBuilder<Parent>
setName(String name)
Set the name of the field.GraphQLFieldBuilder<Parent>
setType(graphql.schema.GraphQLOutputType type)
Set the type of this field.GraphQLFieldBuilder<Parent>
withSupplier(DataFetchingSupplier<?> supplier)
Set the supplier to use for the field.
-
Method Details
-
over
Set aMemberRef
this field is based on. This will copy name, description and deprecation status from the member via annotations.- Parameters:
field
-- Returns:
-
setName
Set the name of the field.- Parameters:
name
-- Returns:
-
setDescription
Set the description of the field. -
setDeprecation
Set if the field is deprecated. -
setType
Set the type of this field.- Parameters:
type
-- Returns:
-
newArgument
GraphQLArgumentBuilder<GraphQLFieldBuilder<Parent>> newArgument()Start building a new argument for this field.- Returns:
-
withSupplier
Set the supplier to use for the field. -
done
Parent done()Indicate that the field is done building and that it should be added to the parent type.- Returns:
-