Module: GraphQL::Query::SerialExecution::ValueResolution

Defined in:
lib/graphql/query/serial_execution/value_resolution.rb

Defined Under Namespace

Classes: BaseResolution, HasPossibleTypeResolution, ListResolution, NonNullResolution, ObjectResolution, ScalarResolution

Constant Summary collapse

TYPE_KIND_STRATEGIES =
{
  GraphQL::TypeKinds::SCALAR =>     ScalarResolution,
  GraphQL::TypeKinds::LIST =>       ListResolution,
  GraphQL::TypeKinds::OBJECT =>     ObjectResolution,
  GraphQL::TypeKinds::ENUM =>       ScalarResolution,
  GraphQL::TypeKinds::NON_NULL =>   NonNullResolution,
  GraphQL::TypeKinds::INTERFACE =>  HasPossibleTypeResolution,
  GraphQL::TypeKinds::UNION =>      HasPossibleTypeResolution,
}

Class Method Summary collapse

Class Method Details

.get_strategy_for_kind(kind) ⇒ Object


5
6
7
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 5

def self.get_strategy_for_kind(kind)
  TYPE_KIND_STRATEGIES[kind] || raise("No value resolution strategy for #{kind}!")
end