I’m trying to analyze the complexity of a subscription document. I’ve configured complexity analysis for query and mutation documents like so:
plug Absinthe.Plug,
schema: MyAppWeb.Schema,
analyze_complexity: true
This works, but not for subscription documents because they’re using the socket.
I was hoping I could add similar config to my socket setup, but analyze_complexity
isn’t a valid key here
use Absinthe.Phoenix.Socket, schema: API.Web.GraphQL.Schema, analyze_complexity: true, pipeline: {API.Web.GraphQL.Pipeline, :build}
Is there way to configure complexity analysis for subscription documents? In the mean time I’ve been copying the selection set from the subscription operation into a query operation and testing it that way, which works but isn’t ideal
cc: @benwilson512