-
Notifications
You must be signed in to change notification settings - Fork 359
feat: update graphql-java dataloader version #1450
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
Merged
samuelAndalon
merged 5 commits into
ExpediaGroup:master
from
samuelAndalon:feat/update-data-loader-version
Jun 2, 2022
Merged
feat: update graphql-java dataloader version #1450
samuelAndalon
merged 5 commits into
ExpediaGroup:master
from
samuelAndalon:feat/update-data-loader-version
Jun 2, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samuelAndalon
commented
May 31, 2022
import java.util.Optional | ||
import java.util.concurrent.CompletableFuture | ||
|
||
data class MissionServiceRequest(val id: Int, val astronautId: Int = -1) | ||
|
||
class MissionDataLoader : KotlinDataLoader<MissionServiceRequest, Mission?> { | ||
override val dataLoaderName: String = "MissionDataLoader" | ||
override fun getOptions(): DataLoaderOptions = DataLoaderOptions.newOptions().setStatisticsCollector { SimpleStatisticsCollector() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for testing purposes we need statistics but in this new release, those are now NOOP by default
tapaderster
reviewed
Jun 2, 2022
...n-dataloader/src/main/kotlin/com/expediagroup/graphql/dataloader/KotlinDataLoaderRegistry.kt
Outdated
Show resolved
Hide resolved
lgtm |
dariuszkuc
approved these changes
Jun 2, 2022
… into feat/update-data-loader-version
tapaderster
approved these changes
Jun 2, 2022
dariuszkuc
pushed a commit
to dariuszkuc/graphql-kotlin
that referenced
this pull request
Aug 5, 2022
* feat: update graphql-java dataloader with version that provides access to cacheMap * feat: update coverage * feat: update docs * feat: update test Co-authored-by: samvazquez <samvazquez@expedia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
In order to have a better mechanism to dispatch a data loader registry we needed to have access to all CompletableFutures by DataLoader, initially we did it by creating a custom implementation of the CacheMap interface, but we added support to do it directly from the data loader library
graphql-java/java-dataloader#115
PR was released on version 3.1.3
probably in the future we can even add the custom methods
to
DataLoaderRegistry
that we added inKotlinDataLoaderRegistry
, that way we can stop decorating the registry and use the one provided by graphql-java-dataloader