|
@@ -741,18 +741,35 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|
|
|
|
|
$registry->addFieldResolver('Query', 'allstatics',
|
|
|
$builder->compose(
|
|
|
- $builder->callback(function($parent, $arg){
|
|
|
- $entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
|
|
- $query = $entity_storage->getQuery()
|
|
|
- ->condition('type', ['static'], 'IN')
|
|
|
- ->accessCheck(TRUE);
|
|
|
- $results = $query->execute();
|
|
|
- return $results;
|
|
|
- }),
|
|
|
- $builder->produce('entity_load_multiple')
|
|
|
- ->map('type', $builder->fromValue('node'))
|
|
|
- ->map('ids', $builder->fromParent())
|
|
|
- )
|
|
|
+ $builder->callback(function($parent, $arg){
|
|
|
+ $entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
|
|
+ $query = $entity_storage->getQuery()
|
|
|
+ ->condition('type', ['static'], 'IN')
|
|
|
+ ->accessCheck(TRUE);
|
|
|
+ $results = $query->execute();
|
|
|
+ return $results;
|
|
|
+ }),
|
|
|
+ $builder->produce('entity_load_multiple')
|
|
|
+ ->map('type', $builder->fromValue('node'))
|
|
|
+ ->map('ids', $builder->fromParent())
|
|
|
+ )
|
|
|
+ );
|
|
|
+
|
|
|
+ $registry->addFieldResolver('Query', 'burgerstatics',
|
|
|
+ $builder->compose(
|
|
|
+ $builder->callback(function($parent, $arg){
|
|
|
+ $entity_storage = \Drupal::entityTypeManager()->getStorage('node');
|
|
|
+ $query = $entity_storage->getQuery()
|
|
|
+ ->condition('type', ['static'], 'IN')
|
|
|
+ ->condition('field_menu_burger', 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',
|