|
@@ -243,6 +243,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|
|
->map('position', $builder->fromValue(0))
|
|
|
));
|
|
|
|
|
|
+ $registry->addFieldResolver('Concernement', 'recit_colophon',
|
|
|
+ $builder->produce('property_path')
|
|
|
+ ->map('type', $builder->fromValue('entity:node'))
|
|
|
+ ->map('value', $builder->fromParent())
|
|
|
+ ->map('path', $builder->fromValue('field_recit_colophon.value'))
|
|
|
+ );
|
|
|
+
|
|
|
$registry->addFieldResolver('Concernement', 'entites',
|
|
|
$builder->produce('entity_reference_revisions')
|
|
|
->map('entity', $builder->fromParent())
|
|
@@ -1065,6 +1072,24 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|
|
)
|
|
|
);
|
|
|
|
|
|
+ $registry->addFieldResolver('Query', 'promotedstatics',
|
|
|
+ $builder->compose(
|
|
|
+ $builder->callback(function($parent, $arg){
|
|
|
+ $entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
|
|
+ $query = $entity_storage->getQuery()
|
|
|
+ ->condition('type', ['static'], 'IN')
|
|
|
+ ->condition('promote', true)
|
|
|
+ ->accessCheck(TRUE);
|
|
|
+ $results = $query->execute();
|
|
|
+ return $results;
|
|
|
+ }),
|
|
|
+ $builder->produce('entity_load_multiple')
|
|
|
+ ->map('type', $builder->fromValue('node'))
|
|
|
+ ->map('ids', $builder->fromParent())
|
|
|
+ )
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
$registry->addFieldResolver('Query', 'statics',
|
|
|
$builder->produce('entity_load_multiple')
|
|
|
->map('type', $builder->fromValue('node'))
|
|
@@ -1109,6 +1134,13 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|
|
->map('entity', $builder->fromParent())
|
|
|
));
|
|
|
|
|
|
+ $registry->addFieldResolver('Static', 'promoted',
|
|
|
+ $builder->produce('property_path')
|
|
|
+ ->map('type', $builder->fromValue('entity:node'))
|
|
|
+ ->map('value', $builder->fromParent())
|
|
|
+ ->map('path', $builder->fromValue('promote.value'))
|
|
|
+ );
|
|
|
+
|
|
|
$registry->addFieldResolver('Static', 'texte',
|
|
|
$builder->produce('property_path')
|
|
|
->map('type', $builder->fromValue('entity:node'))
|