leto
leto copied to clipboard
Allow GraphQLType.serialize() and deserialize() to return futures
The resolvers for GraphQLObject fields have a return value of FutureOr<T> 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.