Limiting/disabling batching in apollo-server

Hi! I want to disable query batching to prevent possible DoS attacks on my GQL server running on apollo-server-express.

I already use complexity analysis but it seems that it works per query not per batch (as well as other validations) and I did not find any public API for limiting batch queries.

Is there any way to implement batch query limiting or disable it at all?

1 Like

There isn’t currently a way to disable or limit (e.g., max batch count) this batching functionality. That sounds like a very reasonable feature request for apollo-server!

Feel free to include a suggested design as it could be good conversation that might unblock the ability for someone (even you!) to make a pull-request for it!

Thanks for mentioning this!

1 Like