graphql-jit
graphql-jit copied to clipboard
doesn't handle resolveType that returns a promise
For abstract types, graphql-js handles resolveType if it's a promise https://github.com/graphql/graphql-js/blob/e590dd2b6f1d05085fbb057fe357be957378bcfb/src/execution/execute.js#L967
graphql-jit currently does not https://github.com/zalando-incubator/graphql-jit/blob/master/src/execution.ts#L896
this normally wouldn't cause a problem because most people don't return a promise from resolveType, but type-graphql converts all resolveTypes to return promises so I'm running into this.
Thanks for the issue.
While there are plans to address these limitations, I would also explore removing this behavior from type-graphql
, those redundant promises do add overhead and prevent v8 optimizations.
Yep already done, just wanted to let you know in case you haven't run across this edge case.
I have the same problem. is there a solution other than forking type-graphql
?
Hello! We're using this library and have a use case in which we would like to resolve the type of some interfaces asynchronously. @ruiaraujo, do I understand you correctly that this is something you would like to support (regardless of the redundant type-graphql
case)? Can you already say if this is something in the near or distant future?
Does the library now support resolving the type of some interface asynchronously?
Any updates on this issue?
Looks like isTypeOf also does not support promises