graphql-engine/v3/crates/engine/tests/explain.rs
Anon Ray 10e12d8acf remote joins: do not include the join field if it already exists (#402)
For remote joins, if join field already exists in the selection set, do
not request it again. Include the join field only if it is not in the
selection set.

A field selection might be expensive, so we do not want to duplicate it.

Fixes: https://hasurahq.atlassian.net/browse/V3API-296
V3_GIT_ORIGIN_REV_ID: d09e4298557ca098433b0758c15703295ccbfd39
2024-03-26 10:25:43 +00:00

66 lines
1.9 KiB
Rust

#[allow(dead_code)]
mod common;
#[test]
fn test_explain_introspection() {
common::test_execute_explain(
"explain/introspection_query",
"explain/introspection_query/metadata.json",
&[],
);
}
#[test]
fn test_multi_root_field_queries() {
common::test_execute_explain(
"explain/multi_root_field_queries",
"execute/multiple_root_fields/successful_execution/metadata.json",
&[],
);
}
#[test]
fn test_field_with_remote_relationship() {
common::test_execute_explain(
"explain/field_with_remote_relationship",
"execute/remote_relationships/array/metadata.json",
&["execute/common_metadata/two_postgres_connector_schema.json"],
);
}
#[test]
fn test_field_with_local_relationship() {
common::test_execute_explain(
"explain/field_with_local_relationship",
"execute/relationships/array/metadata.json",
&["execute/common_metadata/postgres_connector_schema.json"],
);
}
#[test]
fn test_field_with_multi_remote_relationship_subfields() {
common::test_execute_explain(
"explain/field_with_multi_remote_relationship_subfields",
"explain/field_with_multi_remote_relationship_subfields/metadata.json",
&["execute/common_metadata/two_postgres_connector_schema.json"],
);
}
#[test]
fn test_field_with_nested_remote_relationship_1() {
common::test_execute_explain(
"explain/field_with_nested_remote_relationship_1",
"explain/field_with_nested_remote_relationship_1/metadata.json",
&["execute/common_metadata/two_postgres_connector_schema.json"],
);
}
#[test]
fn test_field_with_nested_remote_relationship_2() {
common::test_execute_explain(
"explain/field_with_nested_remote_relationship_2",
"explain/field_with_nested_remote_relationship_2/metadata.json",
&["execute/common_metadata/two_postgres_connector_schema.json"],
);
}