DmitryTsepelev / graphql-ruby-persisted_queries

Persisted queries for graphql-ruby
MIT License
170 stars 20 forks source link

Add multiplex support #24

Closed DmitryTsepelev closed 4 years ago

JanStevens commented 4 years ago

Ok that seemed to work just fine! A couple of screenshots that show that in batch we return the right responses for the batched queries and then the request is done again with the query and the sha256

Screenshot 2020-02-21 at 09 43 32 Screenshot 2020-02-21 at 09 43 23 Screenshot 2020-02-21 at 09 43 17

DmitryTsepelev commented 4 years ago

If the batch is sent and some of the queries are "not persisted", then BatchLink will figure that out and make a new request with only required queries, right?

JanStevens commented 4 years ago

If the batch is sent and some of the queries are "not persisted", then BatchLink will figure that out and make a new request with only required queries, right?

Testing that one out now, but I don't think I can easily do that with the in memory cache, going to need redis so I can delete one key on a page where I know I'm batching queries

JanStevens commented 4 years ago

Cool it seems it does work that way! So I deleted one key from a batch query for 3 queries, this results in one query not being found.

Screenshot 2020-02-21 at 09 57 06

The next request is just for the one query not being found instead of all of them Screenshot 2020-02-21 at 09 57 23

DmitryTsepelev commented 4 years ago

Cool cool, I'll add some more tests and docs and roll out a new version, thank you!