graph_fs 0.1.5

A CLI tool that helps query a local or remote file system by a GraphQL interface
Documentation
use crate::{auth::check_access::check_write_access, schema::Context};

pub mod handler;
pub mod local_fs;
pub mod remote_fs;
pub mod utils;

pub async fn graphql_write_access(context: &Context) -> bool {
    if context.args.use_auth.is_some() && context.args.use_auth.unwrap() {
        let token = context.clone().auth_token.unwrap_or("".to_string());
        return check_write_access(
            context.args.clone(),
            &token,
            context.db_conn.as_ref().unwrap(),
        )
        .await;
    }
    true
}