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

Use node_name to check if the message is local - 1.5 #815

Conversation

thiamsantos
Copy link
Contributor

@thiamsantos thiamsantos commented Dec 4, 2019

Motivation

As reported on absinthe-graphql/absinthe_phoenix#63 the subscriptions messages are getting duplicated when using Redis Pubsub adapter.

Proposed solution

As pointed out by @benwilson512 the phoenix pubsub .... and the logic the code that performs this check was relying on a implementation detail of the PG2 adapter. This PR aims to change that verification to use the node_name function exposed by phoenix pubsub and wrapped by absinthe_phoenix for absinthe 1.5.

The implementation was manually tested against using this repo https://github.com/thiamsantos/subscription_test with both PG2 and redis as adapters.

Related

@benwilson512 benwilson512 merged commit 0e1f75a into absinthe-graphql:master Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants