Skip to content

Commit

Permalink
IBX-5329: Fixed empty field resolving in GraphQL (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 authored Mar 23, 2023
1 parent fd057e5 commit e865e9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/GraphQL/QueryFieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function resolveQueryField(Field $field, Content $content)
return $this->queryFieldService->loadContentItems($content, $field->fieldDefIdentifier);
}

public function resolveQueryFieldConnection(Argument $args, Field $field, Content $content)
public function resolveQueryFieldConnection(Argument $args, ?Field $field, Content $content)
{
if ($field === null) {
return null;
}

if (!isset($args['first'])) {
$args['first'] = $this->queryFieldService->getPaginationConfiguration($content, $field->fieldDefIdentifier);
}
Expand Down

0 comments on commit e865e9b

Please sign in to comment.