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
{{ message }}
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
I've seen #36 but my need is far more simple. I'd love to have a way to know when a GraphQL query has finished being processed, so that my custom-built logging library can "close the story" of the request (I'm using hierarchical stories). I'm not interested in the result of the request, not even if it was successful or threw an error, just in the fact that it ended.
I believe the second alternative is better, since it is simpler and doesn't involve leaking the middleware's implementation details (the fact that it uses promises).
I can propose a PR if you find this idea useful.
The text was updated successfully, but these errors were encountered:
I like the idea of a logger, but I believe this is the wrong layer of abstraction to add such a thing. Instead this should be a feature of graphql-js - there's a task tracking this today at graphql/graphql-js#284
@leebyron In case you might be interested, here's the logger lib (and Chrome extension) I've built and want to integrate with a GraphQL/Relay application in production: http://guigrpa.github.io/storyboard/
I've seen #36 but my need is far more simple. I'd love to have a way to know when a GraphQL query has finished being processed, so that my custom-built logging library can "close the story" of the request (I'm using hierarchical stories). I'm not interested in the result of the request, not even if it was successful or threw an error, just in the fact that it ended.
I see two ways to accomplish this:
The middleware returns its main promise:
The middleware accepts a callback:
I believe the second alternative is better, since it is simpler and doesn't involve leaking the middleware's implementation details (the fact that it uses promises).
I can propose a PR if you find this idea useful.
The text was updated successfully, but these errors were encountered: