Closed tgturner-shopify closed 1 year ago
Hi @tgturner-shopify!
I added 1.13.6 to the matrix (#59) and specs are passing. I tried to log from #before_query
and #prepare_ast
and the order is right. Could you please try to do the same? (in order to log prepare_ast
you need to do EDITOR=code bundle open graphql
, open up lib/graphql/query.rb
and add logging)
There definitely might be something strange going on in our setup, will look into this on our end! I'll close this out and re-open if we find anything.
@tgturner-shopify I found it! It might happen when someone accesses query manually, for instance when there is a tracer that catches "execute_multiplex" event. I'll try to make it work or just yank the last version 😌
Thanks for keeping us in the loop!
graphql (1.13.16)
graphql-ruby-persisted_queries (1.6.0)
Today I was exploring graphql-ruby-persisted_queries but could not for the life of me get my queries to ever save to Redis. After doing some digging around, I noticed that before_query was being called after
prepare_ast
.Because of that, in the following line:
@not_loaded_document
always returnednil
since the expectation is that thebefore_query
callback sets it, but that callback has not been called yet, and my queries were never saved.After downgrading the gem to
1.5.1
everything appears to be working like a charm.It is definitely possible that there is some setup error on my end.