Method: GraphQL::Field#resolve

Defined in:
lib/graphql/field.rb

#resolve(object, arguments, context) ⇒ Object

Get a value for this field

Examples:

resolving a field value

field.resolve(obj, args, ctx)

Parameters:

  • object (Object)

    The object this field belongs to

  • arguments (Hash)

    Arguments declared in the query

  • context (GraphQL::Query::Context)


243
244
245
# File 'lib/graphql/field.rb', line 243

def resolve(object, arguments, context)
  resolve_proc.call(object, arguments, context)
end