Class: Osso::GraphQL::Mutations::DeleteIdentityProvider
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Osso::GraphQL::Mutations::DeleteIdentityProvider
- Defined in:
- lib/osso/graphql/mutations/delete_identity_provider.rb
Instance Method Summary collapse
Methods inherited from BaseMutation
#account_domain, #admin_ready?, #domain_ready?, #field_errors, #internal_ready?, #provider_domain, #ready?, #response_data, #response_error
Instance Method Details
#resolve(id:) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/osso/graphql/mutations/delete_identity_provider.rb', line 14 def resolve(id:) identity_provider = Osso::Models::IdentityProvider.find(id) if identity_provider.destroy Osso::Analytics.capture(email: context[:email], event: self.class.name.demodulize, properties: { id: id }) return response_data(identity_provider: nil) end response_error(identity_provider.errors) end |