Class: SolidusGraphqlApi::Mutations::Checkout::EmptyCart
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- SolidusGraphqlApi::Mutations::Checkout::EmptyCart
- Defined in:
- lib/solidus_graphql_api/mutations/checkout/empty_cart.rb
Instance Method Summary collapse
Instance Method Details
#ready? ⇒ Boolean
23 24 25 |
# File 'lib/solidus_graphql_api/mutations/checkout/empty_cart.rb', line 23 def ready?(*) current_ability.(:update, current_order, guest_token) end |
#resolve ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/solidus_graphql_api/mutations/checkout/empty_cart.rb', line 12 def resolve current_order.empty! current_order.restart_checkout_flow { order: current_order, errors: user_errors("order", current_order.errors) } end |