Class: ShopifyGraphql::CancelSubscription

Inherits:
Object
  • Object
show all
Includes:
Mutation
Defined in:
app/graphql/shopify_graphql/cancel_subscription.rb

Constant Summary collapse

MUTATION =
"mutation appSubscriptionCancel($id: ID!) {\n  appSubscriptionCancel(id: $id) {\n    appSubscription {\n      id\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n"

Instance Method Summary collapse

Methods included from Mutation

#client

Instance Method Details

#call(id:) ⇒ Object



19
20
21
22
23
24
25
# File 'app/graphql/shopify_graphql/cancel_subscription.rb', line 19

def call(id:)
  response = execute(MUTATION, id: id)
  response.data = response.data.appSubscriptionCancel
  handle_user_errors(response.data)
  response.data = parse_data(response.data)
  response
end