reactive_graph_dynamic_graph_impl/interface/
relation.rs

1use async_graphql::dynamic::Interface;
2use async_graphql::dynamic::InterfaceField;
3use async_graphql::dynamic::TypeRef;
4
5pub const INTERFACE_RELATION: &str = "Relation";
6pub const INTERFACE_RELATION_FIELD_KEY: &str = "key";
7pub const INTERFACE_RELATION_FIELD_INSTANCE_ID: &str = "instance_id";
8
9pub fn get_relation_interface() -> Interface {
10    Interface::new(INTERFACE_RELATION)
11        .description("Relations have a outbound entity and a inbound entity as well as components and properties,")
12        .field(InterfaceField::new(INTERFACE_RELATION_FIELD_KEY, TypeRef::named_nn(TypeRef::ID)))
13        .field(InterfaceField::new(INTERFACE_RELATION_FIELD_INSTANCE_ID, TypeRef::named_nn(TypeRef::ID)))
14}