metaphysics
metaphysics copied to clipboard
[tracing] Make it possible to detect resolvers that perform longer running work
We should make these resolvers use async/await, because then these functions will be instances of AsyncFunction
and we can filter resolvers to wrap by checking for that class instead.
I’m thinking that we can maybe use the TS compiler to automatically rewrite all resolvers that return promises, as long as they come from the data loaders.
*babel
No not babel, because the TS support in Babel really only means that it can parse TS code, it doesn’t do anything with the types such as inference, which is probably what we’d need.
yep, that's smart