class Osso::GraphQL::Mutations::DeleteOauthClient
Public Instance Methods
ready?(*)
click to toggle source
# File lib/osso/graphql/mutations/delete_oauth_client.rb, line 25 def ready?(*) admin_ready? end
resolve(id:)
click to toggle source
# File lib/osso/graphql/mutations/delete_oauth_client.rb, line 14 def resolve(id:) oauth_client = Osso::Models::OauthClient.find(id) if oauth_client.destroy Osso::Analytics.capture(email: context[:email], event: self.class.name.demodulize, properties: { id: id }) return response_data(oauth_client: nil) end response_error(oauth_client.errors) end