2023-01-15 16:35:43 +00:00
|
|
|
use super::Context;
|
|
|
|
|
|
|
|
pub struct Mutation;
|
|
|
|
|
|
|
|
#[juniper::graphql_object(Context = Context)]
|
|
|
|
impl Mutation {
|
|
|
|
fn api_version(
|
|
|
|
context: &Context,
|
|
|
|
) -> String {
|
2023-01-15 21:50:48 +00:00
|
|
|
if context.user_auth {
|
|
|
|
"0.1 (authentified)"
|
|
|
|
} else {
|
|
|
|
"0.1 (not authentified)"
|
|
|
|
}.into()
|
2023-01-15 16:35:43 +00:00
|
|
|
}
|
|
|
|
}
|