graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Re-create UnforgivingExecutionContext for graphql-core 3.1.5+

Open alexhafner opened this issue 2 years ago • 0 comments

This pull request addresses the issue in #1368 where we want to be able to use UnforgivingExecutionContext to deal with unexpected errors. The tests for UnforgivingExecutionContext are re-instated as they were before https://github.com/graphql-python/graphene/commit/efc03533ae619e9716d6959d671cddaf8c6f7769#diff-dc90fef2a8de7ab6853d36140a9149eef3342af69e7d5f95e34b3fe2a9a8ebe1, and a slightly adapted of the fix proposed by @weilu https://github.com/graphql-python/graphene/pull/1255#issuecomment-857877151 is implemented for UnforgivingExecutionContext itself. The modified version differentiates between GraphQLError, which it leaves to be handled by graphql-core and other errors, which it treats as unexpected and raises with the original error. This should also fix the tests failing per #1346.

alexhafner avatar Sep 20 '21 18:09 alexhafner