doc: validator attribute under graphql macro

This commit is contained in:
Yin Jifeng 2021-05-19 10:51:50 +08:00
parent 258a5e19a7
commit f220a5d56e
2 changed files with 4 additions and 4 deletions

View File

@ -31,11 +31,11 @@ struct Query;
#[Object]
impl Query {
async fn input(#[validator(
async fn input(#[graphql(validator(
or(
and(IntGreaterThan(value = "10"), IntLessThan(value = "100")),
IntEqual(value = "0")
))] a: String) {
)))] a: String) {
} {
}
}

View File

@ -29,11 +29,11 @@ struct Query;
#[Object]
impl Query {
async fn input(#[validator(
async fn input(#[graphql(validator(
or(
and(IntGreaterThan(value = "10"), IntLessThan(value = "100")),
IntEqual(value = "0")
))] a: String) {
)))] a: String) {
} {
}
}