1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
//! RCOS API mutation to delete a user

use crate::api::rcos::{prelude::*, send_query};
use crate::error::TelescopeError;

#[derive(GraphQLQuery)]
#[graphql(
    schema_path = "graphql/rcos/schema.json",
    query_path = "graphql/rcos/users/delete.graphql"
)]
pub struct DeleteUser;

use delete_user::{ResponseData, Variables};

impl DeleteUser {
    pub async fn execute(user_id: uuid) -> Result<ResponseData, TelescopeError> {
        send_query::<Self>(Variables { user_id }).await
    }
}