graphql – Is there a way to enforce a limit on batch requests in Apollo Server?
I understand Apollo Server by default disables batch requests, but suppose I want to enable them and enforce a limit?
I thought I’d might be able to look at the GraphQLRequestContext from requestDidStart to get the batch query, look at the body, and check its length, but unfortunately the GraphQLRequestContext only contains the query info for each individual request in the batch. There’s no information on the original batch query. Is there somewhere else I should be looking?
Read more here: Source link
