reactive_graph_dynamic_graph_api/
entity_query_field_factory.rs

1use crate::RootObjectType;
2use async_graphql::dynamic::Field;
3use async_trait::async_trait;
4use reactive_graph_graph::EntityType;
5use reactive_graph_graph::Namespace;
6use reactive_graph_lifecycle::Lifecycle;
7use springtime_di::injectable;
8
9#[injectable]
10#[async_trait]
11pub trait EntityQueryFieldFactory: Send + Sync + Lifecycle {
12    fn create_query_fields(&self, namespace: &Namespace) -> Vec<Field>;
13    fn create_query_field(&self, entity_type: &EntityType, root_object_type: RootObjectType) -> Field;
14}