-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I wanted to ask if there is a convenient way to log all incoming graphql api requests. The middleware function could be a way, but I think there's not really a nice way to get information like the graphql path and the inputs etc.
I would like to do something in a similar fashion that I've implemented to log errors:
rootHandler.SetErrorPresenter(func(ctx context.Context, e error) *gqlerror.Error {
err := graphql.DefaultErrorPresenter(ctx, e)
logger.Debugw("graphql request failed",
"message", err.Message,
"path", err.Path,
"locations", err.Locations,
"extensions", err.Extensions,
"rule", err.Rule,
)
return err
})
mihailozarinschi, mattharrigan, zdebra, ilusharulkov, appleboy and 2 more
Metadata
Metadata
Assignees
Labels
No labels