This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Replies: 1 comment
-
@breun Ah, you're correct. Thanks for pointing it out, will update it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/graphql-java-kickstart/graphql-java-servlet/blob/master/README.md#request-scoped-dataloaders shows an example of how to use request-scoped data loaders. However, looking at the
buildDataLoaderRegistry()
method it seems that a newDataLoaderRegistry
is created for each request, but the exact sameuserDataLoader
is put in, so as far as I understand the data loader is still shared between requests (including its cache):The example at https://github.com/graphql-java-kickstart/graphql-spring-boot/blob/master/example-request-scoped-dataloader/src/main/java/graphql/servlet/examples/dataloader/requestscope/CustomGraphQLContextBuilder.java does create a new
DataLoader
instance for every call tobuildDataLoaderRegistry()
, which seems right to me:Am I correct in thinking the first example should be adjusted to also create new instances for every call to
buildDataLoaderRegistry()
?Beta Was this translation helpful? Give feedback.
All reactions