juancastillo0 / leto

Dart GraphQL server libraries. Utilities, code generator, examples and reference implementation.
https://juancastillo0.github.io/leto/
MIT License
38 stars 6 forks source link

Allow GraphQLType.serialize() and deserialize() to return futures #25

Open tigloo opened 5 months ago

tigloo commented 5 months ago

The resolvers for GraphQLObject fields have a return value of FutureOr but GraphQLType.serialize() and deserialize() have a return type of T.

It would be great if GraphQLType could also work with futures.

Example use case: I would like to build a GraphQLExtendedUri type that automatically generates signed URLs to retrieve files from a CDN when being queried from the server.