run_partials isn’t compatible with all execution
I came across run_partials and it looks super interesting, and useful for some of our needs. I’m curious what it was specifically added for given that it’s not used in the library itself…?
Trying it out, it doesn’t seem to work with a schema of any real sophistication. It breaks on common tracing patterns that reference GraphQL::Query through context, but get a Partial that seems to only loosely duck-type with Query instead (in our case, we use Sorbet a lot so the proper type identity is actually important). The capability would be terrific, but I think Partial needs to actually extend from Query and fully implement it if it’s going to replace it sometimes.
I started building it to improve ObjectCache, but ended up using it (so far...) for a new @stream implementation instead. I covered the bases I needed at first and have been addressing other things as they come up. I also thought it seemed like a generally useful thing to keep around.
I'm definitely interested in continuing to improve it. One possibility is to merge it entirely with GraphQL::Query -- that's what happened with the runtime code when the dust settled (one codepath for "full" queries and partial ones).
Neat. I had a hunch defer/stream was involved; it looks very incremental and is similar to what ended up powering stitched subscriptions. I may poke at it a bit as long as it’s on the green path.