You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great for development purpose to include exception stack traces to graphql errors returned by graphql-server.flask when it catches an exception during the execution of a request.
For security reasons, I think it shouldn't be enabled by default, but at least offer the option to do it, since for now, it's just not possible to do.
The only way I found to debut an error is to place a break point in graphql-server.flask.GraphQLView.dispatch_request method in the excpect handler... which is not very convenient.
If you are open to the idea, I can make a PR to poc around this feature.
The text was updated successfully, but these errors were encountered:
And provide it to the middleware parameter when using GraphQLView.as_view:
fromgraphql_server.flaskimportGraphQLViewdefpublicapi_view():
returnGraphQLView.as_view(
"publicapi",
# public_schema is an instance of graphene.Schemaschema=public_schema.graphql_schema,
middleware=[exception_logging_middleware],
)
# app here is the Flask appapp.add_url_rule("/publicapi", view_func=publicapi_view(), methods=["POST"])
Hi,
It would be great for development purpose to include exception stack traces to graphql errors returned by
graphql-server.flask
when it catches an exception during the execution of a request.For security reasons, I think it shouldn't be enabled by default, but at least offer the option to do it, since for now, it's just not possible to do.
The only way I found to debut an error is to place a break point in
graphql-server.flask.GraphQLView.dispatch_request
method in the excpect handler... which is not very convenient.If you are open to the idea, I can make a PR to poc around this feature.
The text was updated successfully, but these errors were encountered: