diff --git a/src/GraphQL/Query/Operator/ArgumentsAwareOperatorInterface.php b/src/GraphQL/Query/Operator/ArgumentsAwareOperatorInterface.php new file mode 100644 index 00000000..1dc3d8ec --- /dev/null +++ b/src/GraphQL/Query/Operator/ArgumentsAwareOperatorInterface.php @@ -0,0 +1,25 @@ +fieldName] ?? null; // check for alias as we cache the properties with aliases @@ -86,6 +91,12 @@ public function resolve($value = null, $args = [], $context = [], ResolveInfo $r } /** @var \Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator\AbstractOperator $operatorImpl */ $operatorImpl = $this->getGraphQlService()->buildQueryOperator($this->typeName, $this->attributes); + if ($operatorImpl instanceof ArgumentsAwareOperatorInterface) { + $operatorImpl->setArguments($args ?? []); + } + if ($operatorImpl instanceof ContextAwareOperatorInterface) { + $operatorImpl->setContext($context ?? []); + } $element = $this->loadDataElement($value, 'object'); $valueFromOperator = $operatorImpl->getLabeledValue($element, $resolveInfo);