-
Hi! We recently introduced dataloaders into our GraphQL API and they worked great for several days before they started throwing this exception:
I see there's a nonNull assertion on the line directly above the call that throws that exception in DataLoaderHelper.java. Could it somehow be passing that assertion even though it shouldn't? Here's the rough structure of one of the dataloader definitions:
Any initial thoughts? We haven't been able to reproduce the issue locally to get a debugger on it yet, but will update if we do. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This turned out to be an issue with code further down the chain in our service definition. It boiled down to us throwing an exception in the service code which eventually resulted in returning The solution we went with was returning a default non-null value in the |
Beta Was this translation helpful? Give feedback.
Great - I was just about to reply back that you MUST a non null map
I have this check in the code
perhaps we could change the code to either require a non null map OR handle null as if its an empty map. I think reuiring a non null map is better - it would tell you straight away via an assert that your
exceptionally -> return null
was the problem