0

I'm using Netflix DGS library in SpringBoot, and I have a parent query that whose schema is something like,

type Parent @connection {
    attr1
    attr2
    ...
    child1: Child
}

type Child {
    childAttr1
    childAttr2

Here for a graphql query to fetch first 10 records for Parent, I'm using Data Loader to load all the Child data at once for all the 10 Parents using.

Currently bulk fetch for Child returns a List which may or may not contain values for every Parent object. I want to add a error block which can be attached to the request to notify which Parent object didn't had Child.

Since the Data Loader returns a CompletableFuture, I am not able to interrupt the flow and throw an exception if data is null.

Is there some solution to this problem, or any other way with which it can be handled?

Thanks!

0 Answers0