Refactor Execution::Next runner flow - #5726
Conversation
|
Could you please isolate the bug fix from the code reorganization? The bug fix is an easy include, but I doubt I want to include the code reorganization. Whenever possible, I prefer a single method because I can read it from top-to-bottom and know what's going on. When the code is divided into methods, then the reader (me?) has to jump around to find out what's really going on. From a maintenance perspective, I prefer keeping API surface area as small as possible: private instead of public whenever possible, inline instead of extracted whenever possible, local variable instead of instance variable whenever possible, and so on. |
22971c2 to
60f2067
Compare
|
@rmosolgo Thank you, that makes sense. |
GraphQL::Execution::Runner#executeand#begin_executecurrently handle multiplex analysis, query setup, step execution, result finalization, root authorization, operation directives, and root-type dispatch inline.This PR reorganizes those responsibilities into private methods:
SelectionsStepconstruction.The existing result ordering, tracing boundaries, directive finalization, mutation isolation, and stack-error handling are preserved.