How can we make sure that data being fetched in one dataFetcher being available in other dataFetcher in a grapghQL java project

How can we make sure that data being fetched in one dataFetcher being available in other dataFetcher in a grapghQL java project


0

I am very new to GraphQL. Below is my init method in my Resolver


    public void init() {
        builder.type("SystemTopic", typeWiring -> typeWiring
                .dataFetcher("items", this::itemsConnection).dataFetcher("payloads", this::getPayloads));
    }

I need the data fetched in items in fetcher in payloads fetcher. The seconds fetcher payloads execution starts before items done its job. So, some required data is missing in payloads.

I tried by adding dataLatch waiting time in the payloads fetcher it seems working some times but not always. I look for permanent and feasible solution.

I expect that whatever the data being added to the Context in the first fetcher, it should be available in the payloads.

Any help on this is really appreciated.

Thank you, Syamala.


Load 6 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *