Package net.morimekta.providence.graphql
Interface GQLFieldProvider<Message extends net.morimekta.providence.PMessage<Message>>
-
- Type Parameters:
Message- The message type.
- All Known Implementing Classes:
FieldFieldProvider,InputValueFieldProvider,TypeFieldProvider
public interface GQLFieldProvider<Message extends net.morimekta.providence.PMessage<Message>>Interface for functionality that provide field values based on a source message and a GQL field.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description net.morimekta.providence.descriptor.PMessageDescriptor<Message>getDescriptor()Get the type descriptor this mutator is for.java.util.Collection<net.morimekta.providence.descriptor.PField<Message>>getFields()Get the set of fields that can be mutated with this mutator.java.lang.Objectprovide(Message message, net.morimekta.providence.descriptor.PField<Message> field, GQLField selection)Mutate the message according to the field selection.
-
-
-
Method Detail
-
getDescriptor
net.morimekta.providence.descriptor.PMessageDescriptor<Message> getDescriptor()
Get the type descriptor this mutator is for. This may not be an interface type.- Returns:
- The message type being mutated.
-
getFields
java.util.Collection<net.morimekta.providence.descriptor.PField<Message>> getFields()
Get the set of fields that can be mutated with this mutator.- Returns:
- Collection of mutating fields.
-
provide
java.lang.Object provide(Message message, net.morimekta.providence.descriptor.PField<Message> field, GQLField selection)
Mutate the message according to the field selection. The field selection will represent a single field in the base message, and will be called for each requested field.- Parameters:
message- The base message builder to be mutated.field- The source field requested.selection- The field selection to be filled or changed.- Returns:
- The mutated value for the field.
-
-