async-graphql 1.14.2

A GraphQL server library implemented in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use async_graphql::validators::StringMinLength;
use async_graphql::*;

#[async_std::test]
pub async fn test_string_min_length() {
    struct Query1;

    #[Object]
    impl Query1 {
        async fn test(&self, #[arg(validator(StringMinLength(length = "6")))] _id: String) -> bool {
            true
        }
    }
}