diff --git a/src/web/modules/custom/ouatt_graphql/graphql/ouatt_extension.base.graphqls b/src/web/modules/custom/ouatt_graphql/graphql/ouatt_extension.base.graphqls index f4a8425..8f59994 100644 --- a/src/web/modules/custom/ouatt_graphql/graphql/ouatt_extension.base.graphqls +++ b/src/web/modules/custom/ouatt_graphql/graphql/ouatt_extension.base.graphqls @@ -40,6 +40,7 @@ type Entiteintegre { prise: Float id: Int revision_id: Int + active: Boolean } type Entite implements NodeInterface { diff --git a/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php b/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php index 42c5142..ae92f43 100644 --- a/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php +++ b/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php @@ -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', $builder->produce('property_path') ->map('type', $builder->fromValue('entity:paragraph'))