Skip to content

Commit 73d28cd

Browse files
committed
feat: 更新找不到registry时候的错误文案
1 parent 099a65b commit 73d28cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dataloader-plus-core/src/main/java/com/github/lokic/dataloaderplus/core/proxy/ServiceInvocationHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
3434

3535
ExDataLoaderRegistry registry = RegistryHolder.getRegistry();
3636
if (registry == null) {
37-
throw new IllegalArgumentException("@DataLoaderService need in DataLoaderTemplate block");
37+
//see https://www.graphql-java.com/documentation/v16/batching/
38+
throw new IllegalArgumentException("@DataLoaderService need in DataLoaderTemplate block " +
39+
"or not support an asynchronous off thread call to a DataLoader");
3840
}
3941

4042
int contextIndex = findContextIndex(method);

0 commit comments

Comments
 (0)