Class: ShopifyAPI::GraphQL::Bulk::Cancel
- Inherits:
-
Request
- Object
- Request
- ShopifyAPI::GraphQL::Bulk::Cancel
- Defined in:
- lib/shopify_api/graphql/bulk/cancel.rb
Overview
:nodoc:
Constant Summary collapse
- BULK_OPERATION_CANCEL =
<<~GQL #{BULK_OPERATION_FIELDS} mutation bulkOperationCancel($id: ID!) { bulkOperationCancel(id: $id) { bulkOperation { ...BulkOperationFields } userErrors { field message } } } GQL
Instance Method Summary collapse
Instance Method Details
#execute(id, options = nil) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/shopify_api/graphql/bulk/cancel.rb', line 22 def execute(id, = nil) begin data = super(BULK_OPERATION_CANCEL, :id => id).dig(:data, :bulk_operation_cancel, :bulk_operation) rescue => e raise Error, "cancel request failed: #{e}" end Operation.new(data, ) end |