1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use crate::client::schema::{
schema,
U64,
};
#[derive(cynic::QueryFragment, Debug)]
#[cynic(schema_path = "./assets/schema.sdl")]
pub struct NodeInfo {
pub utxo_validation: bool,
pub vm_backtrace: bool,
pub min_gas_price: U64,
pub max_tx: U64,
pub max_depth: U64,
pub node_version: String,
}
#[derive(cynic::QueryFragment, Debug)]
#[cynic(schema_path = "./assets/schema.sdl", graphql_type = "Query")]
pub struct QueryNodeInfo {
pub node_info: NodeInfo,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn node_info_query_gql_output() {
use cynic::QueryBuilder;
let operation = QueryNodeInfo::build(());
insta::assert_snapshot!(operation.query)
}
}