lib/graphql/schema/object.rb in graphql-2.0.31 vs lib/graphql/schema/object.rb in graphql-2.1.0

- old
+ new

@@ -28,10 +28,14 @@ class << self # This is protected so that we can be sure callers use the public method, {.authorized_new} # @see authorized_new to make instances protected :new + def wrap_scoped(object, context) + scoped_new(object, context) + end + # This is called by the runtime to return an object to call methods on. def wrap(object, context) authorized_new(object, context) end @@ -88,9 +92,13 @@ nil end end end end + end + + def scoped_new(object, context) + self.new(object, context) end end def initialize(object, context) @object = object