async-graphql-parser 4.0.7

GraphQL query parser for async-graphql
1
2
3
4
5
6
7
8
9
10
11
12
use async_graphql_parser::*;

#[test]
fn test_recursion_limit() {
    let depth = 65;
    let field = "a {".repeat(depth) + &"}".repeat(depth);
    let query = format!("query {{ {} }}", field.replace("{}", "{b}"));
    assert_eq!(
        parse_query(query).unwrap_err(),
        Error::RecursionLimitExceeded
    );
}