@Retention(CLASS) @Target({METHOD})
public @interface Mutation
Declares a
GraphQLClient method as a GraphQL mutation.
Identical in shape to Query – the value() is the operation
document and Var-annotated parameters supply its $variables –
but sent as a mutation. The method ends with an
OnComplete<GraphQLResponse<T>> callback.Methods
public abstract String value() | The GraphQL operation document, e.g. mutation AddReview($ep: Episode!, $review: ReviewInput!) { createReview(episode: $ep, review: $review) { stars } }. |
public abstract String operationName() default "" | The operation name to send in the request’s operationName field. |
Method details
value
public abstract String value()The GraphQL operation document, e.g.
mutation AddReview($ep: Episode!, $review: ReviewInput!) { createReview(episode: $ep, review: $review) { stars } }.operationName
public abstract String operationName() default ""The operation name to send in the request’s
operationName
field. Optional; required only when value() declares more
than one operation.