Add description for GraphQL query
This commit is contained in:
parent
ecd8f58542
commit
eb48924761
@ -12,7 +12,10 @@ pub struct Query;
|
|||||||
|
|
||||||
#[juniper::graphql_object(Context = Database)]
|
#[juniper::graphql_object(Context = Database)]
|
||||||
impl Query {
|
impl Query {
|
||||||
#[graphql(name = "allLanguages")]
|
#[graphql(
|
||||||
|
name = "allLanguages",
|
||||||
|
description = "Retrieve all languages defined in the database"
|
||||||
|
)]
|
||||||
fn all_languages(context: &Database) -> Vec<Language> {
|
fn all_languages(context: &Database) -> Vec<Language> {
|
||||||
context.all_languages().unwrap()
|
context.all_languages().unwrap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user