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