reactive_graph_client/client/runtime/shutdown/
api.rs1use crate::client::runtime::shutdown::mutations::shutdown::mutations::shutdown;
2use std::sync::Arc;
3
4use crate::ReactiveGraphClient;
5use crate::ReactiveGraphClientExecutionError;
6
7pub struct Shutdown {
8 client: Arc<ReactiveGraphClient>,
9}
10
11impl Shutdown {
12 pub fn new(client: Arc<ReactiveGraphClient>) -> Self {
13 Self { client }
14 }
15
16 pub async fn shutdown(&self) -> Result<bool, ReactiveGraphClientExecutionError> {
17 self.client.execute_runtime(shutdown(), |data| data.shutdown).await
18 }
19}