Elixir version (elixir -v): Elixir 1.16.0 (compiled with Erlang/OTP 26)
Absinthe version (mix deps | grep absinthe): 1.7.6
Client Framework and version (Relay, Apollo, etc): Apollo, version is probably irrelevant
Expected behavior
We want to subscribe to the same subscription twice: one subscription is alive throughout the lifecycle of the app (counter for notifications), second is only alive when a component rendering the content of notifications is open.
Environment
Expected behavior
We want to subscribe to the same subscription twice: one subscription is alive throughout the lifecycle of the app (counter for notifications), second is only alive when a component rendering the content of notifications is open.
Actual behavior
When subscribing to the same subscription twice (with different set of fields), unsubscribing of one of the subs kills the second sub. It happens due to unregistering by field_key, which is a total duplicate in this case: https://github.com/absinthe-graphql/absinthe/blob/5705d9a0e16bf425d29f5fc7a945bbff4d751ec5/lib/absinthe/subscription.ex#L179 I believe it should check the record and only remove references to doc_ids.