reactive_graph_dynamic_graph_api/
entity_mutation_object_factory.rs1use async_graphql::dynamic::Field;
2use async_graphql::dynamic::Object;
3use async_trait::async_trait;
4use reactive_graph_graph::EntityType;
5use reactive_graph_lifecycle::Lifecycle;
6use springtime_di::injectable;
7
8#[injectable]
9#[async_trait]
10pub trait EntityMutationObjectFactory: Send + Sync + Lifecycle {
11 fn create_mutation_objects(&self) -> Vec<Object>;
13
14 fn create_mutation_object(&self, entity_type: EntityType) -> Object;
16
17 fn create_update_field(&self, entity_type: &EntityType) -> Option<Field>;
19
20 fn create_trigger_field(&self, entity_type: &EntityType) -> Option<Field>;
22
23 fn create_export_field(&self) -> Field;
25
26 fn create_delete_field(&self) -> Field;
28}