Skip to content

Commit

Permalink
refactor(graphql)!: InputObject::getFieldDirectiveOperator() => `In…
Browse files Browse the repository at this point in the history
…putObject::getFieldOperatorDirective()`.
  • Loading branch information
LastDragon-ru committed Jan 31, 2024
1 parent 0600d0d commit e0f97a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/graphql/src/Builder/Types/InputObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ abstract protected function getFieldOperator(
*
* @return ?T
*/
protected function getFieldDirectiveOperator(
string $directive,
protected function getFieldOperatorDirective(
Manipulator $manipulator,
InputFieldSource|ObjectFieldSource|InterfaceFieldSource $field,
Context $context,
string $directive,
): ?Operator {
// Builder?
$builder = $context->get(HandlerContextBuilderInfo::class)?->value->getBuilder();
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/src/SearchBy/Types/Condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected function getObjectDefaultOperator(
Context $context,
): ?OperatorContract {
// Directive?
$directive = parent::getFieldDirectiveOperator(Operator::class, $manipulator, $field, $context);
$directive = parent::getFieldOperatorDirective($manipulator, $field, $context, Operator::class);

if ($directive) {
return $directive;
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/src/SortBy/Types/Clause.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected function getObjectDefaultOperator(
InputFieldSource|ObjectFieldSource|InterfaceFieldSource $field,
Context $context,
): OperatorContract {
return parent::getFieldDirectiveOperator(Operator::class, $manipulator, $field, $context)
return parent::getFieldOperatorDirective($manipulator, $field, $context, Operator::class)
?? $manipulator->getOperator($this->getScope(), SortByOperatorPropertyDirective::class);
}
}

0 comments on commit e0f97a8

Please sign in to comment.