Skip to content

Commit

Permalink
Merge pull request #1194 from hosh/hosh/fix-absinthe-subscription-emp…
Browse files Browse the repository at this point in the history
…ty-publishes

Ignore subscription publish with empty subscribed_fields
  • Loading branch information
benwilson512 authored Sep 12, 2022
2 parents 1a7cf6b + c3dd302 commit 77d415d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/absinthe/subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ defmodule Absinthe.Subscription do
term,
Absinthe.Resolution.t() | [subscription_field_spec]
) :: :ok
def publish(_pubsub, _mutation_result, []), do: :ok

def publish(pubsub, mutation_result, %Absinthe.Resolution{} = info) do
subscribed_fields = get_subscription_fields(info)
publish(pubsub, mutation_result, subscribed_fields)
Expand Down

0 comments on commit 77d415d

Please sign in to comment.