From e50784e406f6d336b9d516b238cb5fc3c5c489bf Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 12 Mar 2024 03:18:53 +0200 Subject: [PATCH] Handle `null` for `fieldContext` within `resolvePotentialPartialArray` --- src/Resolvers/TransformedDataResolver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Resolvers/TransformedDataResolver.php b/src/Resolvers/TransformedDataResolver.php index 18039725..c32d21cb 100644 --- a/src/Resolvers/TransformedDataResolver.php +++ b/src/Resolvers/TransformedDataResolver.php @@ -213,8 +213,12 @@ protected function transformIterableItems( protected function resolvePotentialPartialArray( array $value, - TransformationContext $fieldContext, + ?TransformationContext $fieldContext, ): array { + if($fieldContext === null) { + return $value; + } + if ($fieldContext->exceptPartials && $fieldContext->exceptPartials->count() > 0) { $partials = [];