Promise & Function return support
SergeShkurko opened this issue · 5 comments
@SergeShkurko i will work on that when i have time, in 2 week max, thanks for the feedback
Any update?
@pie6k , @SergeShkurko due to typescript metadata support for complexe type, you have to specify the return type with @returnType(date)
. You can see a discution about this here
and for the function return type i see nothing about this in the graphql specification, can i have a link?
@nicolasgere It's mentioned here: https://github.com/graphql/graphql-js
under Getting Started/Using GraphQL.js subsection.
The resolve function can return a value, a promise, or an array of promises. A more complex example is included in the top level tests directory.
@poliron0 , GraphQl-ts support both, just do not forget to specify @returnType(T)