Module: GraphQL::Query::ValueResolution

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

Defined Under Namespace

Classes: BaseResolution, EnumResolution, 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 =>       EnumResolution,
  GraphQL::TypeKinds::NON_NULL =>   NonNullResolution,
}

Class Method Summary collapse

Class Method Details

.get_strategy_for_kind(kind) ⇒ Object


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

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