Browse Source

update other queries

axolotle 3 years ago
parent
commit
d847627e68
3 changed files with 14 additions and 36 deletions
  1. 3 4
      src/api/fragments/TextCardFields.gql
  2. 9 19
      src/api/queries/TextCard.gql
  3. 2 13
      src/api/queries/TextsDepart.gql

+ 3 - 4
src/api/fragments/TextCardFields.gql

@@ -19,18 +19,17 @@ fragment TextCardFields on TextInterface {
   }
   families: familles {
     id
-    uuid
     name
   }
-  # field_titre
+  # field_titre FIXME ?
   authors: auteurs {
     id
-    uuid
     name
+    first_name
+    last_name
   }
   edition {
     id
-    uuid
     name
   }
   type: __typename

+ 9 - 19
src/api/queries/TextCard.gql

@@ -1,8 +1,8 @@
-#import "../fragments/TextCardFields.gql"
+#import "../fragments/TextFields.gql"
 
 query TextRef ($id: Int!) {
   text: texte (id: $id) {
-    ...TextCardFields
+    ...TextFields
 
     ... on Textref {
       children: text_produits {
@@ -18,27 +18,17 @@ query TextRef ($id: Int!) {
           name
         }
       }
-      tags {
-        id
-        name
-      }
-      # degres_detrangement: Int
-      notes {
-        note
-        number: numero
-      }
     }
 
     ... on Textprod {
-      tags: tagsprod {
+      siblings: text_en_rebond {
         id
-        name
-      }
-      notes {
-        note
-        number: numero
-        links: liens {
-          id
+        title
+        authors: auteurs {
+          name
+        }
+        edition {
+          name
         }
       }
     }

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

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