Return value of validateOperationParams is a list #1615
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The list built with
$errors[] = …
exclusively, which means it cannot have gaps.The helps libraries using this method, as they can type the result passing through as
list<…>
as well.Currently I need this workaround https://github.com/rebing/graphql-laravel/pull/1147/files#diff-a9a648e9e869340c2272eeeb6e14c37a0ef8f9ce32b23f63503391e8384c975cR26
when I want to map this to an
\GraphQL\Error\Error
which I want to pass tographql-php/src/Executor/ExecutionResult.php
Line 82 in 9e675b5
With this change, I wouldn't need the
phpstan-var
in my code.