Skip to content

Commit c036782

Browse files
rthideawayfubhy
authored andcommitted
Fix entity load arguments (#916)
1 parent dfca1ed commit c036782

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ public function __construct(
131131
* @param $type
132132
* @param $id
133133
* @param null $language
134-
* @param null $bundles
134+
* @param array|null $bundles
135135
* @param bool $access
136136
* @param \Drupal\Core\Session\AccountInterface|NULL $accessUser
137137
* @param string $accessOperation
138138
* @param \Drupal\graphql\GraphQL\Execution\FieldContext $context
139139
*
140140
* @return \GraphQL\Deferred
141141
*/
142-
public function resolve($type, $id, $language, $bundles, ?bool $access, ?AccountInterface $accessUser, ?string $accessOperation, FieldContext $context) {
142+
public function resolve($type, $id, $language, ?array $bundles, ?bool $access, ?AccountInterface $accessUser, ?string $accessOperation, FieldContext $context) {
143143
$resolver = $this->entityBuffer->add($type, $id);
144144

145145
return new Deferred(function () use ($type, $id, $language, $bundles, $resolver, $context, $access, $accessUser, $accessOperation) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ public function __construct(
132132
* @param $type
133133
* @param array $ids
134134
* @param null $language
135-
* @param array|NULL $bundles
135+
* @param array|null $bundles
136136
* @param bool $access
137137
* @param \Drupal\Core\Session\AccountInterface|NULL $accessUser
138138
* @param string $accessOperation
139139
* @param \Drupal\graphql\GraphQL\Execution\FieldContext $context
140140
*
141141
* @return \GraphQL\Deferred
142142
*/
143-
public function resolve($type, array $ids, $language, array $bundles, ?bool $access, ?AccountInterface $accessUser, ?string $accessOperation, FieldContext $context) {
143+
public function resolve($type, array $ids, $language, ?array $bundles, ?bool $access, ?AccountInterface $accessUser, ?string $accessOperation, FieldContext $context) {
144144
$resolver = $this->entityBuffer->add($type, $ids);
145145

146146
return new Deferred(function () use ($type, $ids, $language, $bundles, $resolver, $context, $access, $accessUser, $accessOperation) {

0 commit comments

Comments
 (0)