Browse Source

update queries with new fields

axolotle 3 years ago
parent
commit
52ab717298

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

@@ -17,6 +17,12 @@ fragment TextFields on TextInterface {
       content: note
       number: numero
     }
+    field_titre_regular
+    field_titre_italique
+    lien_reference {
+      url
+      title
+    }
   }
 
   ... on Textprod {

+ 10 - 0
src/api/fragments/TextTreeFields.gql

@@ -5,5 +5,15 @@ fragment TextTreeFields on TextInterface {
     id
     name
   }
+
+  ... on Textref {
+    field_titre_regular
+    field_titre_italique
+    authors: auteurs {
+      id
+      name
+    }
+  }
+
   type: __typename
 }

+ 11 - 0
src/api/queries/TextCard.gql

@@ -7,6 +7,10 @@ query TextRef ($id: Int!) {
     ... on Textref {
       children: text_produits {
         id
+        families: familles {
+          id
+          name
+        }
       }
       siblings: text_en_rebond {
         id
@@ -14,6 +18,10 @@ query TextRef ($id: Int!) {
         authors: auteurs {
           name
         }
+        families: familles {
+          id
+          name
+        }
         edition {
           name
         }
@@ -27,6 +35,9 @@ query TextRef ($id: Int!) {
         authors: auteurs {
           name
         }
+        families: familles {
+          id
+        }
         edition {
           name
         }

+ 8 - 0
src/api/queries/TextsDepart.gql

@@ -5,10 +5,18 @@ query TextsDepart {
     ...TextFields
     children: text_produits {
       id
+      families: familles {
+        id
+        name
+      }
     }
     siblings: text_en_rebond {
       id
       title
+      families: familles {
+        id
+        name
+      }
       authors: auteurs {
         name
       }