You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-v19/batching.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,7 +273,7 @@ DataFetcher<?> dataFetcherThatCallsTheDataLoader = new DataFetcher<Object>() {
273
273
```
274
274
275
275
In the example above, the call to `characterDataLoader.load(argId)` can happen some time in the future on another thread. The graphql-java
276
-
engine has no way of knowing when it's good time to dispatch outstanding `DataLoader` calls and hence the data loader call might never complete
276
+
engine has no way of knowing when it's a good time to dispatch outstanding `DataLoader` calls and hence the data loader call might never complete
277
277
as expected and no results will be returned.
278
278
279
279
Remember a data loader call is just a promise to actually get a value later when it's an optimal time for all outstanding calls to be batched
@@ -309,7 +309,7 @@ DataFetcher<?> dataFetcherThatCallsTheDataLoader = new DataFetcher<Object>() {
309
309
Notice above the `characterDataLoader.load(argId)` returns immediately. This will enqueue the call for data until a later time when all
310
310
the graphql fields are dispatched.
311
311
312
-
Then later when the `DataLoader` is dispatched, it's`BatchLoader` function is called. This code can be asynchronous so that if you have multiple batch loader
312
+
Then later when the `DataLoader` is dispatched, its`BatchLoader` function is called. This code can be asynchronous so that if you have multiple batch loader
313
313
functions they all can run at once. In the code above `CompletableFuture.supplyAsync(() -> getTheseCharacters(keys));` will run the ``getTheseCharacters``
0 commit comments