GraphQuery
@Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER] )
Marks a Retrofit interface method as a GraphQL operation.
The annotation value must match the name of a .graphql file (without extension) in the configured assets directory (default: graphql/). At runtime, the co.anitrend.retrofit.graphql.annotation.processor.GraphProcessor discovers the file and injects its contents into the request body.
Example:
@POST("/graphql")
@GraphQuery("GetMarketPlaceApps")
suspend fun getMarketPlaceApps(@Body builder: QueryContainerBuilder): Response<GraphContainer<MarketPlaceListings>>Content copied to clipboard
Parameters
value
The operation name, matching a .graphql file in assets (without extension).
See also
co.anitrend.retrofit.graphql.model.GraphQLRequest
co.anitrend.retrofit.graphql.model.GraphQLDocumentRegistry