Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Subscription Gateway caching? #488

Open
darrenfurr opened this issue May 12, 2021 · 6 comments
Open

Question: Subscription Gateway caching? #488

darrenfurr opened this issue May 12, 2021 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@darrenfurr
Copy link

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

@mcollina
Copy link
Collaborator

It should update automatically. Could you upload a full example?

@darrenfurr
Copy link
Author

@mcollina - working on getting you an example. Sorry for the delay

@darrenfurr
Copy link
Author

@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

@mcollina
Copy link
Collaborator

The best approach would be to send a PR to fix our implementation!

@mcollina mcollina added bug Something isn't working good first issue Good for newcomers labels May 21, 2021
@ramonmulia
Copy link

hey @darrenfurr could you create a demo repo with some examples?

@darrenfurr
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants