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