spring-graphql icon indicating copy to clipboard operation
spring-graphql copied to clipboard

@BatchMapping not working for mutation response

Open palhoye opened this issue 8 months ago • 3 comments

Spring Boot 3.3.0 with Spring GraphQL v1.3.0

I have a GraphQL query and mutation that returns the same response. The response is complex with nested GraphQL types and @BatchMapping at several layers.

When I execute a mutation that will return a large number of rows in the response, it breaks. Upon investigation I see that fields marked in the controller as @BatchMapping, are not batching but running individually for each item.

When I execute a query with the exact same fragment as response and same data it works fine and I see that the fields marked as @BatchMapping works as expected by batching the data.

palhoye avatar Jun 07 '24 20:06 palhoye