Skip to content

Commit 9f2c928

Browse files
rthideawayfubhy
authored andcommitted
Fix argument mismatch in EntityLoadMultiple data producer (#852)
1 parent 68c94bc commit 9f2c928

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/Plugin/GraphQL/DataProducer/Entity/EntityLoadMultiple.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
* label = @Translation("Entities")
2222
* ),
2323
* consumes = {
24-
* "entity_type" = @ContextDefinition("string",
24+
* "type" = @ContextDefinition("string",
2525
* label = @Translation("Entity type")
2626
* ),
27-
* "entity_ids" = @ContextDefinition("string",
27+
* "ids" = @ContextDefinition("any",
2828
* label = @Translation("Identifier"),
2929
* multiple = TRUE
3030
* ),
31-
* "entity_language" = @ContextDefinition("string",
32-
* label = @Translation("Entity languages(s)"),
31+
* "language" = @ContextDefinition("string",
32+
* label = @Translation("Entity languages"),
3333
* multiple = TRUE,
3434
* required = FALSE
3535
* ),
36-
* "entity_bundle" = @ContextDefinition("string",
36+
* "bundles" = @ContextDefinition("any",
3737
* label = @Translation("Entity bundle(s)"),
3838
* multiple = TRUE,
3939
* required = FALSE
@@ -127,8 +127,9 @@ public function resolve($type, array $ids, $language = NULL, array $bundles = NU
127127
return new Deferred(function () use ($type, $ids, $language, $bundles, $resolver, $context) {
128128
/** @var \Drupal\Core\Entity\EntityInterface[] $entities */
129129
if (!$entities = $resolver()) {
130-
// If there is no entity with this id, add the list cache tags so that the
131-
// cache entry is purged whenever a new entity of this type is saved.
130+
// If there is no entity with this id, add the list cache tags so that
131+
// the cache entry is purged whenever a new entity of this type is
132+
// saved.
132133
$type = $this->entityTypeManager->getDefinition($type);
133134
/** @var \Drupal\Core\Entity\EntityTypeInterface $type */
134135
$tags = $type->getListCacheTags();
@@ -163,4 +164,5 @@ public function resolve($type, array $ids, $language = NULL, array $bundles = NU
163164
return $entities;
164165
});
165166
}
167+
166168
}

0 commit comments

Comments
 (0)