Closed ejscunha closed 3 years ago
A test would really help me understand what the issue is, can you at least supply some examples from your own code and then I can try to write a test?
Will it also work to just swap the order of the update_config
so that the pubsub
one goes last?
Oh I see, the issue is that if you set context: %{foo: :bar}
, it nukes the context pubsub value that is set. @binaryseed I like your solution.
A test would really help me understand what the issue is, can you at least supply some examples from your own code and then I can try to write a test?
I will try to setup a test tomorrow for this.
Will it also work to just swap the order of the update_config so that the pubsub one goes last?
If we change the order we lose the added context information.
Looking into the issues, #247 is what I'm observing and this PR should fix it (it did on my project).
Here's a fix that works by re-ordering functions in update_config
https://github.com/absinthe-graphql/absinthe_plug/pull/249 & a test for it
Thanks for the PR anyway!
Oh that makes sense, I didn't understand at first. Thank you for taking caring of that quickly. 🙏
Map values coming from init_options were overwriting the previous value instead of merging both maps.
This was removing the pubsub key from the config context map, which made subscription's triggers from mutations stop working.
I have no idea on how to test this fix.