2023-12-29 11:12:06 +03:00
|
|
|
#[allow(dead_code)]
|
|
|
|
mod common;
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_explain_introspection() -> anyhow::Result<()> {
|
2024-01-29 08:11:49 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/introspection_query",
|
2024-01-29 08:11:49 +03:00
|
|
|
"explain/introspection_query/metadata.json",
|
|
|
|
&[],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_multi_root_field_queries() -> anyhow::Result<()> {
|
2024-01-29 08:11:49 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/multi_root_field_queries",
|
2024-01-29 08:11:49 +03:00
|
|
|
"execute/multiple_root_fields/successful_execution/metadata.json",
|
|
|
|
&[],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_field_with_remote_relationship() -> anyhow::Result<()> {
|
2023-12-29 11:12:06 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/field_with_remote_relationship",
|
2024-01-29 08:11:49 +03:00
|
|
|
"execute/remote_relationships/array/metadata.json",
|
|
|
|
&["execute/common_metadata/two_postgres_connector_schema.json"],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_field_with_local_relationship() -> anyhow::Result<()> {
|
2023-12-29 11:12:06 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/field_with_local_relationship",
|
2024-01-29 08:11:49 +03:00
|
|
|
"execute/relationships/array/metadata.json",
|
|
|
|
&["execute/common_metadata/postgres_connector_schema.json"],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_field_with_multi_remote_relationship_subfields() -> anyhow::Result<()> {
|
2023-12-29 11:12:06 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/field_with_multi_remote_relationship_subfields",
|
2024-01-29 08:11:49 +03:00
|
|
|
"explain/field_with_multi_remote_relationship_subfields/metadata.json",
|
|
|
|
&["execute/common_metadata/two_postgres_connector_schema.json"],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_field_with_nested_remote_relationship_1() -> anyhow::Result<()> {
|
2023-12-29 11:12:06 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/field_with_nested_remote_relationship_1",
|
2024-01-29 08:11:49 +03:00
|
|
|
"explain/field_with_nested_remote_relationship_1/metadata.json",
|
|
|
|
&["execute/common_metadata/two_postgres_connector_schema.json"],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-04-02 20:06:13 +03:00
|
|
|
fn test_field_with_nested_remote_relationship_2() -> anyhow::Result<()> {
|
2023-12-29 11:12:06 +03:00
|
|
|
common::test_execute_explain(
|
2024-03-26 13:24:29 +03:00
|
|
|
"explain/field_with_nested_remote_relationship_2",
|
2024-01-29 08:11:49 +03:00
|
|
|
"explain/field_with_nested_remote_relationship_2/metadata.json",
|
|
|
|
&["execute/common_metadata/two_postgres_connector_schema.json"],
|
2024-04-02 20:06:13 +03:00
|
|
|
)
|
2023-12-29 11:12:06 +03:00
|
|
|
}
|