Closed
Description
There are a lot of non-user-facing objects created to resolve a GraphQL query:
- Tokens
- AST nodes
- Irep nodes
- FieldResolutionContexts
- FieldResults
- SelectionResults
- (and plenty more: Lazies, LazyConnectionWrapper, Irep Scopes ... 😬 )
I think some of these could be merged into one: FieldResolutionContext, FieldResult, SelectionResult. They all form a tree which corresponds to the final result. Merging them would open some interesting doors:
- Traversing the tree of objects & results at runtime (eg How can I get the parent fields from ctx? #881)
- Deferred/streaming execution (if nodes retain their runtime objects and know how to continue executing themselves, a bit like ExecFrame from Defer directive #168)
Also, it would be a performance improvement due to fewer allocations (#861)
I don't have a priority for this; I want to get a few features finished out first. But I thought I'd open the issue so people know that the idea is out there!
Metadata
Metadata
Assignees
Labels
No labels