Module: Dry::GraphQL

Defined in:
lib/dry/graphql.rb,
lib/dry/graphql/rom.rb,
lib/dry/graphql/types.rb,
lib/dry/graphql/version.rb,
lib/dry/graphql/base_object.rb,
lib/dry/graphql/type_mappings.rb,
lib/dry/graphql/schema_builder.rb

Overview

Module containing GraphQL enhancements

Defined Under Namespace

Modules: GeneratedTypes, ROM, Struct, Types Classes: BaseObject, SchemaBuilder, TypeMappings

Constant Summary collapse

VERSION =
'2.0.1'

Class Method Summary collapse

Class Method Details

.from(type, name:, schema:, **opts) ⇒ Object



28
29
30
# File 'lib/dry/graphql.rb', line 28

def from(type, name:, schema:, **opts)
  SchemaBuilder.new(name: name, type: type, schema: schema, options: opts).graphql_type
end

.register_type_mapping(input_type, output_type) ⇒ Object



32
33
34
# File 'lib/dry/graphql.rb', line 32

def register_type_mapping(input_type, output_type)
  TypeMappings.registry.merge!(input_type => output_type)
end