juniper/integration_tests/juniper_tests/src/api.rs

13 lines
306 B
Rust
Raw Normal View History

#[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"));
}