Skip to content

Commit d78a028

Browse files
committed
Check if GraphQL::Query::Partial is defined
Signed-off-by: Yannick Utard <[email protected]>
1 parent 2e16b4a commit d78a028

File tree

1 file changed

+1
-1
lines changed
  • instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers

1 file changed

+1
-1
lines changed

instrumentation/graphql/lib/opentelemetry/instrumentation/graphql/tracers/graphql_trace.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def analyze_query(query:, &block)
9999
def execute_query(query:, &block)
100100
attributes = {}
101101
attributes['graphql.operation.name'] = query.selected_operation_name if query.selected_operation_name
102-
if query.is_a?(::GraphQL::Query::Partial)
102+
if defined?(::GraphQL::Query::Partial) && query.is_a?(::GraphQL::Query::Partial)
103103
attributes['graphql.partial.path'] = query.path.to_s
104104
else
105105
attributes['graphql.operation.type'] = query.selected_operation.operation_type

0 commit comments

Comments
 (0)