GraphQL: Handle timeouts with grace
The Issue
Currently, if I make a request for a large pipeline graph using the REST API, it takes a number of seconds to load BUT the spinner on the frontend keeps spinning that whole time.
With GraphQL, it times out and sends the frontend an error. On the frontend, we cannot know if this error will resolve or not, so we show the error.
Often the request will succeed later, in which case the frontend can remove the error notification.
However, this is not an ideal situation for users as they will get an error and can't know it might eventually go away. What can we do to make this behave more like the REST endpoint.
See !55523 (merged) for the kinds of shenanigans we are doing to bridge this now.
Technical Proposal
Try resolving this by implementing https://graphql-ruby.org/queries/timeout.html, as suggested by Laura and Charlie per the thread in #323213 (comment 577892394). Additional context can be found in other threads of this issue.