gql added active field to entite paragraph

This commit is contained in:
Bachir Soussi Chiadmi 2024-10-04 15:42:28 +02:00
parent 6026548366
commit 8b514b0dd8
2 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,7 @@ type Entiteintegre {
prise: Float prise: Float
id: Int id: Int
revision_id: Int revision_id: Int
active: Boolean
} }
type Entite implements NodeInterface { type Entite implements NodeInterface {

View File

@ -361,6 +361,14 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
) )
); );
// active: Boolean
$registry->addFieldResolver('Entiteintegre', 'active',
$builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph'))
->map('value', $builder->fromParent())
->map('path', $builder->fromValue('field_active.value'))
);
$registry->addFieldResolver('Entiteintegre', 'actuelfuture', $registry->addFieldResolver('Entiteintegre', 'actuelfuture',
$builder->produce('property_path') $builder->produce('property_path')
->map('type', $builder->fromValue('entity:paragraph')) ->map('type', $builder->fromValue('entity:paragraph'))