Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return value of validateOperationParams is a list #1615

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

mfn
Copy link
Contributor

@mfn mfn commented Oct 7, 2024

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 to

* @param list<Error> $errors

With this change, I wouldn't need the phpstan-var in my code.

mfn and others added 2 commits October 7, 2024 23:29
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.
@spawnia spawnia merged commit 32676e2 into webonyx:master Oct 8, 2024
15 checks passed
@spawnia
Copy link
Collaborator

spawnia commented Oct 8, 2024

Thank you, released with https://github.com/webonyx/graphql-php/releases/tag/v15.14.2

@mfn mfn deleted the mfn-list branch October 8, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants