Replies: 1 comment
-
this prints every request coming in. gqlsrv.AroundOperations(func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
oc := graphql.GetOperationContext(ctx)
fmt.Printf("around: %s %s", oc.OperationName, oc.RawQuery)
return next(ctx)
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
Beta Was this translation helpful? Give feedback.
All reactions