Class: GraphSQL::Mapping::Association

Inherits:
Data
  • Object
show all
Defined in:
lib/graphsql/mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#field_nameObject (readonly)

Returns the value of attribute field_name

Returns:

  • (Object)

    the current value of field_name



5
6
7
# File 'lib/graphsql/mapping.rb', line 5

def field_name
  @field_name
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/graphsql/mapping.rb', line 5

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/graphsql/mapping.rb', line 5

def type
  @type
end

Instance Method Details

#resolved_typeObject

type: may be a class or a -> { ... } proc (for forward references between mutually-associated types, e.g. Game <-> Organization).



8
9
10
# File 'lib/graphsql/mapping.rb', line 8

def resolved_type
  type.respond_to?(:call) ? type.call : type
end