Closed LewisYearsley closed 1 year ago
thanks for reporting! The answer is that I don't know, and it's a bit hard to verify without a reproduction script.
This might well be a missing feature in Mercurius. If so, would you like to send a Pull Request?
Thanks, @mcollina - I'll try to figure out what the behaviour should be and based on that I'll be happy to open a PR with the changes if required.
Thanks again @mcollina for getting my changes in - we have them out in prod now and already showing results. We're good to close.
Hey. We've been using
errorFormatter
Mercurius option to intercept and log errors. i.e.This has served us well for queries and mutations, but now we're using subscriptions.
In the case of subscriptions, we've noticed that the callback provided as
errorFormatter
doesn't seem to get run, is that expected?I've come up with something that works, which is to move all of the logging logic to graphql hooks. i.e.
So to summarise:
errorFormatter
isn't executed for subscriptions?Using Mercurius 11.5.0