Browse Source

update TextsDepart query

axolotle 3 years ago
parent
commit
ba2f5d6767
2 changed files with 29 additions and 2 deletions
  1. 27 2
      src/api/queries/TextsDepart.gql
  2. 2 0
      src/store/modules/texts.js

+ 27 - 2
src/api/queries/TextsDepart.gql

@@ -1,6 +1,31 @@
+#import "../fragments/TextCardFields.gql"
+
 query TextsDepart {
   textsdepart {
-    id,
-    title
+    ...TextCardFields
+    children: text_produits {
+      id
+    }
+    siblings: text_en_rebond {
+      id
+      title
+      authors: auteurs {
+        name
+        first_name
+        last_name
+      }
+      edition {
+        name
+      }
+    }
+    tags {
+      id
+      name
+    }
+    # degres_detrangement: Int
+    notes {
+      note
+      number: numero
+    }
   }
 }

+ 2 - 0
src/store/modules/texts.js

@@ -52,6 +52,8 @@ export default {
   },
 
   getters: {
+    textsDepart: state => state.textsDepart,
+
     textsDepartOptions: state => {
       if (!state.textsDepart) return undefined
       return state.textsDepart.map(({ id, title }) => ({