-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Field resolvers should also be subject to async APIs configuration #63
Comments
Conceptually, GraphQL operations (queries/mutations/subscriptions) are a special case of field resolvers that happen to be on well known root types. Technically, this means that everything about field resolvers is the same as these root types resolvers, apart from the fact that the former get an instance of the resolved type as first param. Therefore, all the configuration that applies to field resolvers also applies to resolvers of the fields that are part of these root types, like CompletableFuture return type, or DataFetcherEnvironment parameter. Resolves: #64 Resolves: #61 Resolves: #63 Co-authored-by: Joffrey Bion <joffrey.bion@booking.com>
@kobylynskyi I dont see any documentation on how to use |
@vinaybedre I think for more flexibility, this configuration has since been changed to This is what I have in my current Maven config:
|
@joffrey-bion Thanks for the hint. |
@vinaybedre I don't believe this is possible at the moment. But I'll let @kobylynskyi confirm that, as I haven't contributed here in a while |
Issue Description
The generated field resolvers currently don't respect the
generateAsyncApis
configuration parameter, although they are part of the API just like top-level resolvers.Expected Result
When
generateAsyncApis
is enabled, field resolvers should have a return type wrapped inCompletableFuture
as well.Actual Result
Field resolvers just have a plain java type as return type.
The text was updated successfully, but these errors were encountered: