Package org.eclipse.microprofile.graphql
Annotation Interface Mutation
Specifies that the annotated method provides the implementation (ie. the resolver) for a GraphQL mutation.
For example, a user might annotate a method as such:
For example, a user might annotate a method as such:
public class CharacterService { @Mutation("addCharacter") @Description("Save a new character") public Character save(Character character) { //... } }Schema generation of this would result in a stanza such as:
type Mutation { "Save a new character" addCharacter(character: CharacterInput): Character }
-
Optional Element Summary
-
Element Details
-
value
String value- Returns:
- the name of the GraphQL mutation.
- Default:
- ""
-