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 02f8c7f..f224f47 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 @@ -64,6 +64,7 @@ type Entite implements NodeInterface { type Source { id: Int! + uuid: String! audios: [Filefield] date: Date documents: [Filefield] 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 373449e..53367b0 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 @@ -600,6 +600,11 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase { ->map('entity', $builder->fromParent()) ); + $registry->addFieldResolver('Source', 'uuid', + $builder->produce('entity_uuid') + ->map('entity', $builder->fromParent()) + ); + $registry->addFieldResolver('Source', 'description', $builder->produce('property_path') ->map('type', $builder->fromValue('entity:paragraph'))