module GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader
Public Instance Methods
load_application_object(argument, id, context)
click to toggle source
# File lib/graphql/schema/member/has_arguments.rb, line 263 def load_application_object(argument, id, context) # See if any object can be found for this ID if id.nil? return nil end object_from_id(argument.loads, id, context) end
load_application_object_failed(err)
click to toggle source
# File lib/graphql/schema/member/has_arguments.rb, line 320 def load_application_object_failed(err) raise err end
object_from_id(type, id, context)
click to toggle source
Look up the corresponding object for a provided ID. By default, it uses Relay-style {Schema.object_from_id}, override this to find objects another way.
@param type [Class, Module] A GraphQL
type definition @param id [String] A client-provided to look up @param context [GraphQL::Query::Context] the current context
# File lib/graphql/schema/member/has_arguments.rb, line 259 def object_from_id(type, id, context) context.schema.object_from_id(id, context) end