@Retention(CLASS) @Target({METHOD})
public @interface Query
Declares a
GraphQLClient method as a GraphQL query. The
value() is the operation document sent verbatim to the server;
the method’s Var-annotated parameters supply its $variables.
The method ends with an OnComplete<GraphQLResponse<T>> callback
whose T is the generated @Mapped response-data type.Methods
public abstract String value() | The GraphQL operation document, e.g. query HeroName($episode: Episode) { hero(episode: $episode) { name } }. |
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.
query HeroName($episode: Episode) { hero(episode: $episode) { name } }.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.