stackshareio/graphql-cache

Cannot use graphql-batch and graphql-cache on the same field

thebadmonkeydev opened this issue · 2 comments

Out of the box, if using this both graphql-cache and graphql-batch queries return an error:

{"error":"no _dump_data is defined for class Proc"}

which is the error encountered by graphql-cache when it doesn't know how to dump a resolved value to the cache store. I'll have to investigate if it is even possible to combine these two gems (at least on the same field, my current belief is that if used on separate fields, there is no conflict out of the box, but that will require validation)

@vincedevendra @thebadmonkeydev 👋 Could we get a release with these changes? We actually added something similar to an initializer as I thought graphql-cache didn't support promises/batch responses. (https://github.com/RedHatInsights/compliance-backend/blob/master/config/initializers/graphql_cache.rb)

@dLobatog I've been wondering about that, too. I'm not an owner or maintainer of this gem. I did the work on that PR, but my company ended up not needing it and I never really pushed for a release. I do hate to see this gem go dormant--I think it's valuable.