Add description for GraphQL query

This commit is contained in:
Lucien Cartier-Tilet 2023-01-05 12:15:07 +01:00
parent ecd8f58542
commit eb48924761
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

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()
}