Class: GraphqlDevise::MountMethod::OperationPreparers::ResolverTypeSetter

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb

Instance Method Summary collapse

Constructor Details

#initialize(authenticatable_type) ⇒ ResolverTypeSetter

Returns a new instance of ResolverTypeSetter.



7
8
9
# File 'lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb', line 7

def initialize(authenticatable_type)
  @authenticatable_type = authenticatable_type
end

Instance Method Details

#call(resolver) ⇒ Object



11
12
13
14
15
# File 'lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb', line 11

def call(resolver, **)
  resolver.type(@authenticatable_type, null: false)

  resolver
end