add new fragments for different levels of data
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
# This fragment queries data needed for an object to be displayed as a `Node`
|
||||||
|
|
||||||
|
fragment NodeFull on TextInterface {
|
||||||
|
id
|
||||||
|
|
||||||
|
... on Textref {
|
||||||
|
preTitle: field_titre_regular
|
||||||
|
title: field_titre_italique
|
||||||
|
link: lien_reference {
|
||||||
|
title
|
||||||
|
url
|
||||||
|
}
|
||||||
|
|
||||||
|
edition {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
|
||||||
|
notes {
|
||||||
|
content: note
|
||||||
|
number: numero
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
... on Textprod {
|
||||||
|
notes {
|
||||||
|
content: note
|
||||||
|
number: numero
|
||||||
|
|
||||||
|
links: liens {
|
||||||
|
# FIXME probably need to query titles and stuff on `Textref` or `Creation`
|
||||||
|
id
|
||||||
|
type: __typename
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
... on Textprod {
|
||||||
|
parents: text_de_depart {
|
||||||
|
id
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# This fragment queries some elementary data to define the content structure
|
||||||
|
|
||||||
|
fragment NodeInitial on TextInterface {
|
||||||
|
id
|
||||||
|
type: bundle
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
|
||||||
|
... on Textprod {
|
||||||
|
parents: text_de_depart {
|
||||||
|
id
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
siblings: text_en_rebond {
|
||||||
|
id
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
... on Textref {
|
||||||
|
|
||||||
|
siblings: text_en_rebond {
|
||||||
|
id
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
authors: auteurs {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
first_name
|
||||||
|
last_name
|
||||||
|
}
|
||||||
|
|
||||||
|
preTitle: field_titre_regular
|
||||||
|
title: field_titre_italique
|
||||||
|
|
||||||
|
children: text_produits {
|
||||||
|
id
|
||||||
|
variant: familles {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# This fragment queries data needed for an object to be displayed as a `MiniNodeCard`
|
||||||
|
|
||||||
|
fragment NodePartial on TextInterface {
|
||||||
|
id
|
||||||
|
content: texte
|
||||||
|
|
||||||
|
# Needed by `Creation`
|
||||||
|
images {
|
||||||
|
id
|
||||||
|
url
|
||||||
|
alt
|
||||||
|
}
|
||||||
|
|
||||||
|
... on Textprod {
|
||||||
|
tags: tagsprod {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
... on Textref {
|
||||||
|
tags {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
|
||||||
|
strangeness: degres_detrangement
|
||||||
|
|
||||||
|
edition {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# For debug
|
||||||
|
path
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export { default as NodeFull } from './NodeFull.gql'
|
||||||
|
export { default as NodeInitial } from './NodeInitial.gql'
|
||||||
|
export { default as NodePartial } from './NodePartial.gql'
|
||||||
Reference in New Issue
Block a user