add base query for text cards

This commit is contained in:
axolotle
2021-03-09 16:04:50 +01:00
parent 62ebb0a807
commit a81079bf60
4 changed files with 70 additions and 6 deletions
+37
View File
@@ -0,0 +1,37 @@
fragment TextCardFields on TextInterface {
id
bundle
title
content: texte
images {
id
url
alt
}
videos {
url
}
files: fichiers {
fid
filename
filemime
url
}
families: familles {
id
uuid
name
}
# field_titre
authors: auteurs {
id
uuid
name
}
edition {
id
uuid
name
}
type: __typename
}
+29 -2
View File
@@ -1,5 +1,32 @@
#import "../fragments/TextCardFields.gql"
query TextRef ($id: Int!) {
textref (id: $id) {
title
text: texte (id: $id) {
...TextCardFields
... on Textref {
prods: text_produits {
id
}
bounces: text_en_rebond {
id
title
authors: auteurs {
name
}
edition {
name
}
}
tags {
id
name
}
# degres_detrangement: Int
notes {
note
numero
}
}
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
export { default as TextsDepart } from './TextsDepart.gql'
export { default as TextRef } from './TextRef.gql'
export { default as TextCard } from './TextCard.gql'
export { default as TextdepartRecursive } from './TextdepartRecursive.gql'