metaphysics icon indicating copy to clipboard operation
metaphysics copied to clipboard

[tracing] Make it possible to detect resolvers that perform longer running work

Open alloy opened this issue 6 years ago • 4 comments

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.

alloy avatar Nov 22 '17 17:11 alloy

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.

alloy avatar Nov 22 '17 18:11 alloy

*babel

orta avatar Nov 22 '17 19:11 orta

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.

alloy avatar Nov 22 '17 20:11 alloy

yep, that's smart

orta avatar Nov 28 '17 21:11 orta