GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PR feedback · graphql-java/graphql-java@a7cc794

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • main/java/graphql/execution/instrumentation/dataloader
      • PerLevelDataLoaderDispatchStrategy.java
    • test/groovy/graphql/execution/instrumentation/dataloader
      • BatchCompareDataFetchers.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java‎

Copy file name to clipboardExpand all lines: src/main/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class PerLevelDataLoaderDispatchStrategy implements DataLoaderDispatchStr
4848

4949
static final long DEFAULT_BATCH_WINDOW_NANO_SECONDS_DEFAULT = 500_000L;
5050

51-
private final Map<DeferredCallContext, CallStack> callStackMap = new ConcurrentHashMap<>();
51+
private final Map<DeferredCallContext, CallStack> deferredCallStackMap = new ConcurrentHashMap<>();
5252

5353

5454
private static class CallStack {
@@ -75,7 +75,7 @@ private static class CallStack {
7575
* { a {x} b {y} }
7676
* If a is a list of 3 objects and b is a list of 2 objects we expect 3 + 2 = 5 execute object calls on the level 1 to be happening
7777
* <p/>
78-
* An execute objects again means we can predict the number of fetches in the next level:
78+
* An executed object call again means we can predict the number of fetches in the next level:
7979
* Execute Object a with { a {f1 f2 f3} } means we expect 3 fetches on level 2.
8080
* <p/>
8181
* This means we know a level is ready to be dispatched if:
@@ -257,7 +257,7 @@ private CallStack getCallStack(@Nullable DeferredCallContext deferredCallContext
257257
if (deferredCallContext == null) {
258258
return this.initialCallStack;
259259
} else {
260-
return callStackMap.computeIfAbsent(deferredCallContext, k -> {
260+
return deferredCallStackMap.computeIfAbsent(deferredCallContext, k -> {
261261
CallStack callStack = new CallStack();
262262
int startLevel = deferredCallContext.getStartLevel();
263263
int fields = deferredCallContext.getFields();
Collapse file

‎src/test/groovy/graphql/execution/instrumentation/dataloader/BatchCompareDataFetchers.java‎

Copy file name to clipboardExpand all lines: src/test/groovy/graphql/execution/instrumentation/dataloader/BatchCompareDataFetchers.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ private static List<List<Department>> getDepartmentsForShops(List<Shop> shops) {
8383

8484

8585
private BatchLoader<String, List<Department>> departmentsForShopsBatchLoader = ids -> maybeAsyncWithSleep(() -> {
86-
System.out.println("departments for shops batch loader called with ids: " + ids);
8786
departmentsForShopsBatchLoaderCounter.incrementAndGet();
8887
List<Shop> shopList = new ArrayList<>();
8988
for (String id : ids) {
@@ -129,7 +128,6 @@ private static List<List<Product>> getProductsForDepartments(List<Department> de
129128
}
130129

131130
private BatchLoader<String, List<Product>> productsForDepartmentsBatchLoader = ids -> maybeAsyncWithSleep(() -> {
132-
System.out.println("products for deparments batch loader called with ids: " + ids);
133131
productsForDepartmentsBatchLoaderCounter.incrementAndGet();
134132
List<Department> d = ids.stream().map(departments::get).collect(Collectors.toList());
135133
return completedFuture(getProductsForDepartments(d));

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.