mercurius
mercurius copied to clipboard
Question: Subscription Gateway caching?
Does the federation gateway cache subscriptions? I'm seeing issues where if I add a new field to a schema & deploy that graphql instance. The gateway doesn't appear to return the result. It just returns null.
I have to restart the gateway. Am I missing a setting somewhere to disable this?
Thanks! -Darren
It should update automatically. Could you upload a full example?
@mcollina - working on getting you an example. Sorry for the delay
@mcollina - After some research...I tracked this issue down. It is not the gateway.
I migrated our Apollo server(s) with subscriptions to mercurius with federation, so the issue is with the withFilter implementation in mercurius.
The Apollo implementation returns an asyncIterator which we use with KafkaPubSub
I pulled in the graphql-subscription
package from Apollo & used their withFilter implementation & it works correctly.
Maybe this is a known issue? If you would like - I can setup a demo repo with examples
The best approach would be to send a PR to fix our implementation!
hey @darrenfurr could you create a demo repo with some examples?
@ramonmulia - We ran into a number of issues using the subscription gateway + load balancing. We've moved away from using the subscription gateway & just have our clients connect directly to the subscription service.