Skip to content

Commit e00c50f

Browse files
committed
fix: allow to have queryplans with different options
1 parent 3c0d640 commit e00c50f

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

src/Type/Definition/ResolveInfo.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ class ResolveInfo
110110
*/
111111
public array $variableValues = [];
112112

113-
/**
114-
* Lazily initialized.
115-
*/
116-
private QueryPlan $queryPlan;
117-
118113
/**
119114
* @param \ArrayObject<int, FieldNode> $fieldNodes
120115
* @param array<int, string|int> $path
@@ -207,18 +202,14 @@ public function getFieldSelection(int $depth = 0): array
207202
*/
208203
public function lookAhead(array $options = []): QueryPlan
209204
{
210-
if (! isset($this->queryPlan)) {
211-
$this->queryPlan = new QueryPlan(
212-
$this->parentType,
213-
$this->schema,
214-
$this->fieldNodes,
215-
$this->variableValues,
216-
$this->fragments,
217-
$options
218-
);
219-
}
220-
221-
return $this->queryPlan;
205+
return new QueryPlan(
206+
$this->parentType,
207+
$this->schema,
208+
$this->fieldNodes,
209+
$this->variableValues,
210+
$this->fragments,
211+
$options
212+
);
222213
}
223214

224215
/**

0 commit comments

Comments
 (0)