Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

No simple way to wrap execution #432

Closed
jamiehodge opened this issue Apr 30, 2018 · 2 comments
Closed

No simple way to wrap execution #432

jamiehodge opened this issue Apr 30, 2018 · 2 comments

Comments

@jamiehodge
Copy link
Contributor

jamiehodge commented Apr 30, 2018

It appears as though the only way to wrap the execution promise for tracing/instrumentation is by misusing the extensions function. It would be very nice if one was able to define a wrapper function (that returned the same type), for tracing purposes.

i.e.

tracer: ({ query, variables, execution: Promise<...> }) => trace(query, execution...)

@IvanGoncharov
Copy link
Member

@jamiehodge I'm currently working on #391 and plan to include it into next release.
Is it something similar to what you have in mind?

@jamiehodge
Copy link
Contributor Author

@IvanGoncharov this looks very helpful. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants