Encapsulate checking for GraphQL error
What does this MR do and why?
See !82552 (merged) for details
Related #210556 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- 
I have evaluated the MR acceptance checklist for this MR. 
Edited  by Brett Walker