Class: GraphqlDevise::MountMethod::OperationPreparers::GqlNameSetter

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

Instance Method Summary collapse

Constructor Details

#initialize(mapping_name) ⇒ GqlNameSetter

Returns a new instance of GqlNameSetter.



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

def initialize(mapping_name)
  @mapping_name = mapping_name
end

Instance Method Details

#call(operation) ⇒ Object



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

def call(operation, **)
  operation.graphql_name(graphql_name)

  operation
end