leto icon indicating copy to clipboard operation
leto copied to clipboard

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

Open tigloo opened this issue 1 year ago • 0 comments

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.

tigloo avatar Feb 03 '24 10:02 tigloo