lib/graphql/schema/interface.rb in graphql-2.1.13 vs lib/graphql/schema/interface.rb in graphql-2.2.0
- old
+ new
@@ -67,14 +67,10 @@
if !child_class.const_defined?(:UnresolvedTypeError, false)
add_unresolved_type_error(child_class)
end
elsif child_class < GraphQL::Schema::Object
# This is being included into an object type, make sure it's using `implements(...)`
- backtrace_line = caller_locations(0, 10).find do |location|
- location.base_label == "implements" &&
- location.path.end_with?("schema/member/has_interfaces.rb")
- end
-
+ backtrace_line = caller(0, 10).find { |line| line.include?("schema/member/has_interfaces.rb") && line.include?("in `implements'")}
if !backtrace_line
raise "Attach interfaces using `implements(#{self})`, not `include(#{self})`"
end
end