From 42d1ef3974792ed4bc8c0e304c72a5c9c7230666 Mon Sep 17 00:00:00 2001 From: Alyanna Santos <72548456+al-yanna@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:37:56 -0500 Subject: [PATCH] fix: update check Co-authored-by: Arya Bhimani --- lib/graphql-hive/analyzer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphql-hive/analyzer.rb b/lib/graphql-hive/analyzer.rb index f0f5911..4b3911f 100644 --- a/lib/graphql-hive/analyzer.rb +++ b/lib/graphql-hive/analyzer.rb @@ -11,7 +11,7 @@ def initialize(query_or_multiplex) def on_enter_field(node, _parent, visitor) parent_type = visitor.parent_type_definition - if parent_type&.respond_to?(:graphql_name) + if parent_type&.respond_to?(:graphql_name) && node&.respond_to?(:name) @used_fields.add(parent_type.graphql_name) @used_fields.add(make_id(parent_type.graphql_name, node.name)) end