Skip to content

Commit d2d53f5

Browse files
authored
[5.x] Fix GraphQL error when field doesnt have type (#12757)
1 parent f878a5b commit d2d53f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fields/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public function toGql(): array
442442
$type = ['type' => $type];
443443
}
444444

445-
if ($this->isRequired() && ! $this->hasSometimesRule() && $this->config['type'] !== 'assets') {
445+
if ($this->isRequired() && ! $this->hasSometimesRule() && $this->type() !== 'assets') {
446446
$type['type'] = GraphQL::nonNull($type['type']);
447447
}
448448

0 commit comments

Comments
 (0)