Skip to content

Commit

Permalink
[GraphQL] Replaced deprecated resolver expression function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Feb 4, 2025
1 parent 20ba33f commit bde94d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/services/graphql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
arguments:
$strategies: !tagged_iterator ibexa.graphql.field_type.matrix_resolver.content.strategy
tags:
- { name: overblog_graphql.resolver, alias: "MatrixFieldValue", method: "resolveMatrixFieldValue" }
- { name: overblog_graphql.query, alias: "MatrixFieldValue", method: "resolveMatrixFieldValue" }

Ibexa\FieldTypeMatrix\GraphQL\Strategy\ItemContentResolvingStrategy:
tags:
Expand Down
3 changes: 2 additions & 1 deletion src/lib/GraphQL/FieldValueResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

use Ibexa\Core\Base\Exceptions\BadStateException;
use Ibexa\FieldTypeMatrix\FieldType\Value\RowsCollection;
use Overblog\GraphQLBundle\Definition\Resolver\QueryInterface;

class FieldValueResolver
class FieldValueResolver implements QueryInterface
{
/** @var iterable<\Ibexa\FieldTypeMatrix\GraphQL\Strategy\ContentResolvingStrategyInterface> */
private iterable $strategies;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/GraphQL/Schema/MatrixFieldDefinitionMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function mapToFieldValueResolver(FieldDefinition $fieldDefinition): ?stri
// We can't "pass the definition" to the resolver. We need the columns names. Pass them to the resolver ??
// An alternative is to
return sprintf(
'@=resolver("MatrixFieldValue", [value, "%s"])',
'@=query("MatrixFieldValue", value, "%s")',
$fieldDefinition->identifier
);
}
Expand Down

0 comments on commit bde94d8

Please sign in to comment.