Method: GraphQL::Query#resolve_type
- Defined in:
- lib/graphql/query.rb
#resolve_type(abstract_type, value = :__undefined__) ⇒ GraphQL::ObjectType?
Returns The runtime type of value from Schema#resolve_type.
329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/graphql/query.rb', line 329 def resolve_type(abstract_type, value = :__undefined__) if value.is_a?(Symbol) && value == :__undefined__ # Old method signature value = abstract_type abstract_type = nil end if value.is_a?(GraphQL::Schema::Object) value = value.object end @resolved_types_cache[abstract_type][value] end |