pub async fn subscribe<T: GraphQLQuery + Send + Sync + Unpin + 'static>(
variables: T::Variables
) -> Result<(AsyncWebsocketClient<GraphQLClient, Message>, SubscriptionStream<GraphQLClient, StreamingOperation<T>>)>
examples/tensorswap_order_update_all.rs (
line 11)
9
10
11
12
13
14
15
16
17
18
async fn main() -> Result<()> {
let (_client, mut stream) =
subscribe::<TensorswapOrderUpdateAllQuery>(TensorswapOrderUpdateAllVariables {}).await?;
while let Some(response) = stream.next().await {
dbg!(&response);
}
Ok(())
}