Trait graphql_ws_client::graphql::GraphqlOperation
source · pub trait GraphqlOperation: Serialize {
type GenericResponse;
type Response;
type Error: Error;
// Required method
fn decode(
&self,
data: Self::GenericResponse
) -> Result<Self::Response, Self::Error>;
}
Expand description
An abstraction over GraphQL operations.
Required Associated Types§
sourcetype GenericResponse
type GenericResponse
The “generic” response type. A graphql-ws-client supports running multiple
operations at a time. This GenericResponse is what will intially be decoded -
with the decode
function converting this into the actual operation response.
This type needs to match up with GraphqlClient::Response.