Skip to content

Commit

Permalink
fix: update check
Browse files Browse the repository at this point in the history
Co-authored-by: Arya Bhimani <[email protected]>
  • Loading branch information
al-yanna and aryascripts authored Dec 6, 2024
1 parent 25a0f70 commit 42d1ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphql-hive/analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42d1ef3

Please sign in to comment.