doc: validator attribute under graphql macro

This commit is contained in:
Yin Jifeng 2021-05-19 10:51:50 +08:00
parent 78bb4da72f
commit 3d682a9b75
2 changed files with 4 additions and 4 deletions

View File

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

View File

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