I have my client app written in React
+ Apollo
and backend in Python
+ Ariadne
. Is there any way to handle batched arrays of queries in Ariadne
?
I set custom Link
in my client:
const apolloClient = new ApolloClient({
cache: InMemoryCache(),
link: new BatchHttpLink({ uri })
});
Client started sending queries in the array as expected, but unfortunately I get 400 Bad Request
, because backend was expecting an object instead of the array.
I'm not sure if I should create a middleware for Ariadne
and handle requests manually or there is some automatic solution? I was trying to Google, but phrases ariadne + batch/batching
does not seem to appear together...
For future prosperity an easy way to support batch requests would be:
And then passing it into Ariadne using