query
abstract suspend fun query(operation: QueryFromAnnotation, variables: Map<String, Any?> = emptyMap()): Q(source)
Loads the operation declared by a @GraphQLOperation query object on the root Query type, and returns the response typed as Q.
Example usage:
val result = ctx.query(GetUserQuery)Content copied to clipboard
Return
The query result typed as Q
Parameters
operation
The query operation object declaring the operation document
variables
Optional variables to use in the operation