Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Sudiev committed Oct 8, 2024
1 parent dae8b0e commit b6c54c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parameters/PrefetchDataParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function resolve(object|null $source, array $args, mixed $context, Resolv
// already knowing all the requested fields (source-arguments combinations).
return new Deferred(function () use ($source, $info, $context, $args, $prefetchBuffer) {
if (! $prefetchBuffer->hasResult($source)) {
$this->computePrefetch($args, $context, $info, $prefetchBuffer);
$this->processPrefetch($args, $context, $info, $prefetchBuffer);
}

$result = $prefetchBuffer->getResult($source);
Expand All @@ -65,7 +65,7 @@ public function resolve(object|null $source, array $args, mixed $context, Resolv
}

/** @param array<string, mixed> $args */
private function computePrefetch(array $args, mixed $context, ResolveInfo $info, PrefetchBuffer $prefetchBuffer): void
private function processPrefetch(array $args, mixed $context, ResolveInfo $info, PrefetchBuffer $prefetchBuffer): void
{
$sources = $prefetchBuffer->getObjectsByArguments($args, $info);
$prefetchBuffer->purge($args, $info);
Expand Down

0 comments on commit b6c54c2

Please sign in to comment.