lib/graphql/schema/object.rb in graphql-2.0.23 vs lib/graphql/schema/object.rb in graphql-2.0.24
- old
+ new
@@ -28,9 +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
+ # This is called by the runtime to return an object to call methods on.
+ def wrap(object, context)
+ authorized_new(object, context)
+ end
+
# Make a new instance of this type _if_ the auth check passes,
# otherwise, raise an error.
#
# Probably only the framework should call this method.
#