Trait artemis::GraphQLQuery [−][src]
A convenience trait that can be used to build a GraphQL request body. This will be implemented for you by codegen. It is implemented on the struct you place the derive on.
Associated Types
type Variables: Serialize + Send + Sync + Clone + 'static
[src]
The shape of the variables expected by the query. This should be a generated struct most of the time.
type ResponseData: Serialize + DeserializeOwned + Send + Sync + Clone + 'static + QueryInfo<Self::Variables>
[src]
The top-level shape of the response data (the data
field in the GraphQL response). In practice this should be generated, since it is hard to write by hand without error.
Required methods
fn build_query(
variables: Self::Variables
) -> (QueryBody<Self::Variables>, OperationMeta)
[src]
variables: Self::Variables
) -> (QueryBody<Self::Variables>, OperationMeta)
Produce a GraphQL query struct that can be JSON serialized and sent to a GraphQL API.