diff --git a/src/GraphQL/Types/PageType.php b/src/GraphQL/Types/PageType.php index 41a6a55d700..65e3ea77ff6 100644 --- a/src/GraphQL/Types/PageType.php +++ b/src/GraphQL/Types/PageType.php @@ -2,6 +2,7 @@ namespace Statamic\GraphQL\Types; +use GraphQL\Type\Definition\NonNull; use Statamic\Facades\GraphQL; use Statamic\Fields\Value; use Statamic\Structures\Page; @@ -27,6 +28,10 @@ public function fields(): array ->merge((new PageInterface)->fields()) ->map(function ($field) { if (is_array($field)) { + if ($field['type'] instanceof NonNull) { + $field['type'] = $field['type']->getWrappedType(); + } + $field['resolve'] = $this->resolver(); }