fieldValue('query'); } /** * Get the operationName of the current request. * * @return string|null */ public function operationName(): ?string { return $this->fieldValue('operationName'); } /** * Is the current query a batched query? * * @return bool */ public function isBatched(): bool { return ! is_null($this->batchIndex); } /** * Get the index of the current batch. * * Returns null if we are not resolving a batched query. * * @return int|null */ public function batchIndex(): ?int { return $this->batchIndex; } /** * Advance the batch index and indicate if there are more batches to process. * * @return bool */ public function advanceBatchIndex(): bool { if ($result = $this->hasMoreBatches()) { $this->batchIndex++; } return $result; } }