Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Support generating GraphQLOutputType from ListenableFuture<Scalar> type #69

Open
qcbuyertools opened this issue Feb 21, 2019 · 1 comment

Comments

@qcbuyertools
Copy link

qcbuyertools commented Feb 21, 2019

This relates to #57 but is for a more specific use case.

From the comment:

private GraphQLOutputType getReturnType(Method method)
throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
// Currently it's assumed the response is of type Message, ListenableFuture<? extends
// Message>, ImmutableList<Message>, ListenableFuture<ImmutableList<? extend Message>>, oe
// any Scalar type.

We support type Message, any Scalar type, ImmutableList<Message>, ListenableFuture<? extends Message>, and ListenableFuture<ImmutableList<? extend Message>>, and there is a TODO trying to support ImmutableList<Scalar type>.

Our system is currently using a String return type for a @SchemaModification, and is trying to use ListnableFuture to improve our performance, and we want to wrap a String in a ListenableFuture, which means the method will have ListenableFuture<String> as the return type, which is currently not supported by the getReturnType.

From looking at the code I believe it's quite possible to add ListenableFuture<Scalar type>. Is there any concern of adding the support?

@siderakis
Copy link
Member

siderakis commented Feb 21, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants