Skip to content

Commit

Permalink
fix(graphql/@builder): InputObject will check the convertibility …
Browse files Browse the repository at this point in the history
…before name conflict.
  • Loading branch information
LastDragon-ru committed Dec 27, 2022
1 parent 1af0503 commit 9d7fd62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/graphql/src/Builder/Types/InputObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ public function getTypeDefinitionNode(
: $node->fields;

foreach ($fields as $field) {
// Convertable?
if (!$this->isConvertable($manipulator, $field)) {
continue;
}

// Name should be unique (may conflict with Type's operators)
$fieldName = $manipulator->getNodeName($field);

if (isset($definition->fields[$fieldName])) {
throw new TypeDefinitionFieldAlreadyDefined($fieldName);
}

// Convertable?
if (!$this->isConvertable($manipulator, $field)) {
continue;
}

// Determine type
$fieldType = $manipulator->getNodeTypeName($field);
$fieldNullable = $manipulator->isNullable($field);
Expand Down

0 comments on commit 9d7fd62

Please sign in to comment.