Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/GraphQl/State/Provider/ReadProvider.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,6 +50,11 @@ public function provide(Operation $operation, array $uriVariables = [], array $c

$args = $context['args'] ?? [];

if ($this->serializerContextBuilder) {
// Builtin data providers are able to use the serialization context to automatically add join clauses
$context += $this->serializerContextBuilder->create($operation->getClass(), $operation, $context, true);
}

if (!$operation instanceof CollectionOperationInterface) {
$identifier = $this->getIdentifierFromOperation($operation, $args);

Expand DownExpand Up@@ -102,11 +107,6 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
$context['linkProperty'] = $info->fieldName;
}

if ($this->serializerContextBuilder) {
// Builtin data providers are able to use the serialization context to automatically add join clauses
$context += $this->serializerContextBuilder->create($operation->getClass(), $operation, $context, true);
}

return $this->provider->provide($operation, $uriVariables, $context);
}

Expand Down