-
-
Notifications
You must be signed in to change notification settings - Fork 570
ResolveInfo::getFieldSelectionWithAliases() => now add instance types and the folded union types to the returned schema. #1681
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the PHPStan issues, then mark as ready.
… and the folded union types to the returned schema.
Hi, thank you for the review. How should I fix this PHPStan error ?
On tests/Type/ResolveInfoTest.php Line 741 Something like this ?
|
I would do something like this: $fields = $myCustomWithObjectType->config['fields'];
assert(is_array($fields), 'ensured by type config');
$myCustomType = $fields['customA']; |
Thank you, released with https://github.com/webonyx/graphql-php/releases/tag/v15.20.0. |
Hi,
After using the ResolveInfo::getFieldSelectionWithAliases() method I needed some additionnal data in order to go through the all schema properly.
So I have updated the method to add:
Before this update, we were able to go through union types but it was unreliable, some fields with the same name in different unioned types could be substituted for others.
Now it's consistent and it allows me in my application to handle a proper infinite level eager loading across the entire schema with unions.