From 653a792b7351f9a9f86e18666e93b0f216a90248 Mon Sep 17 00:00:00 2001 From: ruudk Date: Sun, 24 Mar 2024 08:49:37 +0000 Subject: [PATCH] Prettify docs --- docs/class-reference.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/class-reference.md b/docs/class-reference.md index 5f0f11c4c..0bbd84e4c 100644 --- a/docs/class-reference.md +++ b/docs/class-reference.md @@ -351,7 +351,7 @@ public $fieldNodes; public $parentType; /** - * Path to this field from the very root value. + * Path to this field from the very root value. When fields are aliased, the path includes aliases. * * @api * @@ -361,6 +361,17 @@ public $parentType; */ public $path; +/** + * Path to this field from the very root value. This will never include aliases. + * + * @api + * + * @var array + * + * @phpstan-var Path + */ +public $unaliasedPath; + /** * Instance of a schema used for execution. * @@ -1730,7 +1741,7 @@ function getLocations(): array ```php /** * Returns an array describing the path from the root value to the field which produced this error. - * Only included for execution errors. + * Only included for execution errors. When fields are aliased, the path includes aliases. * * @return array|null * @@ -1739,6 +1750,18 @@ function getLocations(): array function getPath(): ?array ``` +```php +/** + * Returns an array describing the path from the root value to the field which produced this error. + * Only included for execution errors. This will never include aliases. + * + * @return array|null + * + * @api + */ +function getUnaliasedPath(): ?array +``` + ## GraphQL\Error\Warning Encapsulates warnings produced by the library.