Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants