-
-
Notifications
You must be signed in to change notification settings - Fork 565
Introduce query plan as a replacement for ResolveInfo::getFieldSelection #65
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
Comments
@vladar I had to write a wrapper around I can submit a pull-request with the wrapper in case you find it useful or maybe inspiring. Our use case is slightly different as we are not solving the fields one by one, rather using a top-down approach resolving the whole request at once and leaving it to this library to process the resulting array. |
@decebal Oh, sorry I missed your comment somehow. I'd appreciate your PR. Can't guarantee that I'll merge it (since we still need complete solution that answers all questions), but it will be useful anyway (as insight, or as direct solution for item 4 from this list). |
@vladar sure thing, I'll do the pull request asap (this week), while I really need to start working on this for my project as it currently has some ugly hacks in order to cover for missing type definitions in resolveInfo |
Currently we have
ResolveInfo::getFieldSelection()
to do simple look-aheads. But it is too limited for real-world scenarios and provides little help when resolving field of union or interface type. Better tool has to address more use-cases. Basically it should provide convenient interface to answer following questions:Current
getFieldSelection
only answers question 1.The syntax for this could be something like this:
This needs further design with regards to nested syntax + things may get quite complicated for type-dependent deep fields.
The text was updated successfully, but these errors were encountered: