added text de depart field to text ref in gql api

This commit is contained in:
2021-06-22 16:49:54 +02:00
parent c8d0e2976e
commit a8daf129f7
2 changed files with 8 additions and 0 deletions
@@ -47,6 +47,7 @@ type Textref implements NodeInterface & TextInterface & MapItemInterface{
field_titre_italique: String
edition: [Taxoterm]
lien_reference: Link
text_de_depart: [Textref]
text_produits: [Textprod]
text_en_rebond: [Textref]
tags: [Taxoterm]
@@ -283,6 +283,13 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase {
->map('entity', $builder->fromParent())
));
$registry->addFieldResolver('Textref', 'text_de_depart',
$builder->compose(
$builder->produce('entity_reference')
->map('entity', $builder->fromParent())
->map('field', $builder->fromValue('field_texte_de_depart'))
));
$registry->addFieldResolver('Textref', 'text_en_rebond',
$builder->compose(
$builder->produce('entity_reference')