update queries with mapitem

This commit is contained in:
axolotle
2021-06-22 22:24:36 +02:00
parent 5ab6e19cde
commit 3450d1b546
6 changed files with 26 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# This fragment queries data needed for an object to be displayed as a `Node` # This fragment queries data needed for an object to be displayed as a `Node`
fragment NodeFull on TextInterface { fragment NodeFull on MapItemInterface {
id id
... on Textref { ... on Textref {
+14 -4
View File
@@ -1,10 +1,14 @@
# This fragment queries some elementary data to define the content structure # This fragment queries some elementary data to define the content structure
fragment NodeInitial on TextInterface { fragment NodeInitial on MapItemInterface {
id id
type: bundle type: __typename
variant: familles { # type: bundle
id
... on TextInterface {
variant: familles {
id
}
} }
... on Textprod { ... on Textprod {
@@ -24,6 +28,12 @@ fragment NodeInitial on TextInterface {
} }
... on Textref { ... on Textref {
parents: text_de_depart {
id
variant: familles {
id
}
}
siblings: text_en_rebond { siblings: text_en_rebond {
id id
+8 -7
View File
@@ -1,14 +1,15 @@
# This fragment queries data needed for an object to be displayed as a `MiniNodeCard` # This fragment queries data needed for an object to be displayed as a `MiniNodeCard`
fragment NodePartial on TextInterface { fragment NodePartial on MapItemInterface {
id id
content: texte ... on TextInterface {
content: texte
# Needed by `Creation` images {
images { id
id url
url alt
alt }
} }
... on Textprod { ... on Textprod {
+1 -1
View File
@@ -1,5 +1,5 @@
query Node ($id: Int!) { query Node ($id: Int!) {
node: texte (id: $id) { node: mapitem (id: $id) {
FRAGMENTS FRAGMENTS
} }
} }
+1 -1
View File
@@ -1,5 +1,5 @@
query Nodes ($ids: [Int]) { query Nodes ($ids: [Int]) {
nodes: textsref (ids: $ids) { nodes: mapitems (ids: $ids) {
FRAGMENTS FRAGMENTS
} }
} }
+1 -1
View File
@@ -1,5 +1,5 @@
query NodesTrees ($id: Int!) { query NodesTrees ($id: Int!) {
node: texte (id: $id) { node: mapitem (id: $id) {
id id
FRAGMENT FRAGMENT
} }