Class: Sail::Graphql::Mutations::SailProfileSwitch

Inherits:
GraphQL::Schema::Mutation
  • Object
show all
Defined in:
lib/sail/mutations.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#resolve(name:) ⇒ Object



39
40
41
42
43
44
# File 'lib/sail/mutations.rb', line 39

def resolve(name:)
  success = Profile.exists?(name: name)
  Profile.switch(name)

  { success: success }
end