From 43f4949063b5b937ee42d91ff159c52a231859d5 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 16 Aug 2020 22:27:14 +0200 Subject: [PATCH] Really ignore field and not create an empty InputType --- src/Config/Parser/AnnotationParser.php | 2 +- tests/Config/Parser/fixtures/annotations/Input/Planet.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Config/Parser/AnnotationParser.php b/src/Config/Parser/AnnotationParser.php index 2d2621de7..96311c128 100644 --- a/src/Config/Parser/AnnotationParser.php +++ b/src/Config/Parser/AnnotationParser.php @@ -627,7 +627,7 @@ private static function getGraphQLInputFieldsFromAnnotations(GraphClass $graphCl // Ignore field with resolver when the type is an Input if (isset($fieldAnnotation->resolve)) { - return []; + continue; } $fieldName = $reflector->getName(); diff --git a/tests/Config/Parser/fixtures/annotations/Input/Planet.php b/tests/Config/Parser/fixtures/annotations/Input/Planet.php index 82f33ad96..7d9356e8a 100644 --- a/tests/Config/Parser/fixtures/annotations/Input/Planet.php +++ b/tests/Config/Parser/fixtures/annotations/Input/Planet.php @@ -12,6 +12,11 @@ */ class Planet { + /** + * @GQL\Field(resolve="...") + */ + protected string $skipField; + /** * @GQL\Field(type="String!") */