juniper/integration_tests/juniper_tests/src/api.rs
2020-07-08 16:40:34 -10:00

12 lines
306 B
Rust

#[test]
fn operation_name_is_public() {
use juniper::{http::GraphQLRequest, DefaultScalarValue};
let request = GraphQLRequest::<DefaultScalarValue>::new(
"query".to_string(),
Some("name".to_string()),
None,
);
assert_eq!(request.operation_name(), Some("name"));
}