Add description for GraphQL query

This commit is contained in:
2023-01-05 12:15:07 +01:00
parent ecd8f58542
commit eb48924761

View File

@@ -12,7 +12,10 @@ pub struct Query;
#[juniper::graphql_object(Context = Database)]
impl Query {
#[graphql(name = "allLanguages")]
#[graphql(
name = "allLanguages",
description = "Retrieve all languages defined in the database"
)]
fn all_languages(context: &Database) -> Vec<Language> {
context.all_languages().unwrap()
}