Skip to content

Commit

Permalink
Really ignore field and not create an empty InputType
Browse files Browse the repository at this point in the history
  • Loading branch information
bartv2 committed Aug 16, 2020
1 parent e5d1cab commit 43f4949
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Config/Parser/AnnotationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions tests/Config/Parser/fixtures/annotations/Input/Planet.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*/
class Planet
{
/**
* @GQL\Field(resolve="...")
*/
protected string $skipField;

/**
* @GQL\Field(type="String!")
*/
Expand Down

0 comments on commit 43f4949

Please sign in to comment.