diff --git a/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb b/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb index be0b31bdeab..6c67bc6cce3 100644 --- a/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb +++ b/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb @@ -90,7 +90,7 @@ def watch_resolve(gateway = Instrumentation.gateway) block = GraphQL::Reactive::Resolve.publish(op, gateway_resolve) end - throw Ext::QUERY_INTERRUPT, error_query if block + throw Ext::QUERY_INTERRUPT, error_query(gateway_resolve) if block ret, res = stack.call(gateway_resolve.arguments) @@ -105,7 +105,7 @@ def watch_resolve(gateway = Instrumentation.gateway) private - def error_query + def error_query(gateway_resolve) ::GraphQL::Query::Result.new( query: gateway_resolve.query, values: {