Created
October 31, 2018 21:11
-
-
Save sultaniman/0b6318071a21af66f87ca6f71928faaf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any, Dict | |
| from graphene_django.views import GraphQLView | |
| from graphql.error import GraphQLError | |
| from graph.format_error import format_error | |
| class MyGraphQLView(GraphQLView): | |
| @staticmethod | |
| def format_error(error) -> Dict[str, Any]: | |
| if isinstance(error, GraphQLError): | |
| return format_error(error) | |
| return GraphQLView.format_error(error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment