Browse Source

add generic text field fragment

axolotle 3 years ago
parent
commit
5fc3c01f14
1 changed files with 42 additions and 0 deletions
  1. 42 0
      src/api/fragments/TextFields.gql

+ 42 - 0
src/api/fragments/TextFields.gql

@@ -0,0 +1,42 @@
+#import "./TextCardFields.gql"
+
+fragment TextFields on TextInterface {
+  ...TextCardFields
+
+  ... on Textref {
+    tags {
+      id
+      name
+    }
+    strangeness: degres_detrangement
+    notes {
+      content: note
+      number: numero
+    }
+  }
+
+  ... on Textprod {
+    tags: tagsprod {
+      id
+      name
+    }
+    notes {
+      content: note
+      number: numero
+      links: liens {
+        id
+        bundle
+        title
+        families: familles {
+          id
+          name
+        }
+        # field_titre FIXME ?
+        authors: auteurs {
+          id
+          name
+        }
+      }
+    }
+  }
+}