reactive_graph_dynamic_graph_api/
union_manager.rs1use async_graphql::dynamic::Union;
2use async_trait::async_trait;
3use springtime_di::injectable;
4
5use reactive_graph_lifecycle::Lifecycle;
6
7pub const UNION_ALL_ENTITIES: &str = "AllEntities";
8pub const UNION_NAMESPACE_ENTITIES_SUFFIX: &str = "Entities";
9
10pub const UNION_ALL_RELATIONS: &str = "AllRelations";
11pub const UNION_NAMESPACE_RELATIONS_SUFFIX: &str = "Relations";
12
13pub const UNION_ALL_FLOWS: &str = "AllFlows";
14pub const UNION_NAMESPACE_FLOWS_SUFFIX: &str = "Flows";
15
16#[injectable]
17#[async_trait]
18pub trait UnionManager: Send + Sync + Lifecycle {
19 fn get_unions(&self) -> Vec<Union>;
21
22 fn all_entities(&self) -> Union;
24
25 fn all_relations(&self) -> Union;
27
28 fn all_flows(&self) -> Union;
30}