Class: Osso::GraphQL::Mutations::DeleteOauthClient
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Osso::GraphQL::Mutations::DeleteOauthClient
show all
- Defined in:
- lib/osso/graphql/mutations/delete_oauth_client.rb
Instance Method Summary
collapse
#account_domain, #admin_ready?, #domain_ready?, #field_errors, #internal_ready?, #provider_domain, #response_data, #response_error
Instance Method Details
#ready? ⇒ Boolean
25
26
27
|
# File 'lib/osso/graphql/mutations/delete_oauth_client.rb', line 25
def ready?(*)
admin_ready?
end
|
#resolve(id:) ⇒ Object
14
15
16
17
18
19
20
21
22
23
|
# 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
|