From 1b199788d200f765d69a1ef14ef6fd375a11de6a Mon Sep 17 00:00:00 2001
From: Philippe Bordron <philippe.bordron@inrae.fr>
Date: Fri, 20 Sep 2024 14:57:30 +0200
Subject: [PATCH] feat: add target to table entry

---
 server/schema/table_entry.js | 3 +++
 server/schema/target.js      | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/server/schema/table_entry.js b/server/schema/table_entry.js
index 4c24e58..078f30c 100644
--- a/server/schema/table_entry.js
+++ b/server/schema/table_entry.js
@@ -11,6 +11,9 @@ type TableEntry {
     "The guide that guides the modification"
     guide: Guide @relationship(type: "IS_PART_OF", direction: IN)
 
+    "The target modified by the guide"
+    target: Target @relationship(type: "IS_PART_OF", direction: IN)
+    
     "The modification"
     modification: Modification @relationship(type: "IS_PART_OF", direction: IN)
 
diff --git a/server/schema/target.js b/server/schema/target.js
index 66e9694..b103914 100644
--- a/server/schema/target.js
+++ b/server/schema/target.js
@@ -65,5 +65,8 @@ type Target implements Sequence @node(labels: ["Sequence", "Target"]) {
   "The interactions the target acts in"
   interactions: [Interaction!]! @relationship(type: "INTERACT_IN", direction: OUT, aggregate: false)
 
+  "Table entries associated to the guide"
+  entries: [TableEntry!]! @relationship(type: "IS_PART_OF", direction: OUT, aggregate: false) @selectable(onRead: true, onAggregate: false)
+
 }
 `
\ No newline at end of file
-- 
GitLab