graphql_client 0.16.0

Typed GraphQL requests and responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use graphql_client::*;

#[derive(GraphQLQuery)]
#[graphql(
    query_path = "tests/default/query.graphql",
    schema_path = "tests/default/schema.graphql",
    variables_derives = "Default"
)]
struct OptQuery;

#[test]
fn variables_can_derive_default() {
    let _: <OptQuery as GraphQLQuery>::Variables = Default::default();
}