devoyage-subgraph 0.0.15

Subgraph is a CLI that instantly generates a GraphQL API around Mongo, SQL, and HTTP APIs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::execute;

#[tokio::test]
async fn guard_success() {
    let request = async_graphql::Request::new(
        r#"
        {
            get_user(get_user_input: { name: "Bongo", age: 10, married: false, email: "nickisyourfan@gmail.com" }) {
                _id
                fail_guard
            }
        }
        "#,
    );

    let response = execute(request, None).await;
    assert!(response.is_err());
}