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

Query-batching doesn't work

Open green2k opened this issue 7 years ago • 4 comments

Hi, does this graphql-faker "middleware" support query-batching?

I always get an error that the input JSON is invalid :disappointed:

green2k avatar Aug 23 '17 20:08 green2k

@green2k Do you mean query-batching implemented by Apollo server?

IvanGoncharov avatar Aug 23 '17 20:08 IvanGoncharov

@IvanGoncharov Yup -> http://dev.apollodata.com/core/network.html#query-batching

green2k avatar Aug 23 '17 20:08 green2k

@green2k It's vendor extension and express-graphql (reference server) which we use in Faker doesn't support it. Not sure how to add support for it. I have an idea of exporting Faker as express middleware so you can use it with Apollo Server but it will require a huge time investment.

Meanwhile, I need to add explicit batching detection and throw a better error message.

How critical is batching support for your use cases? Is it easy to disable batching on the client?

IvanGoncharov avatar Aug 23 '17 21:08 IvanGoncharov

This would be nice to have, but disabling batching on the client is just too easy to put any effort here. An error message would be good, though, as it's not immediately obvious what's wrong.

lomereiter avatar Nov 09 '17 14:11 lomereiter