Class: ShopifyGraphql::DeletePrivateMetafield
- Inherits:
-
Object
- Object
- ShopifyGraphql::DeletePrivateMetafield
- Includes:
- Mutation
- Defined in:
- app/graphql/shopify_graphql/delete_private_metafield.rb
Constant Summary collapse
- MUTATION =
"mutation privateMetafieldDelete($input: PrivateMetafieldDeleteInput!) {\n privateMetafieldDelete(input: $input) {\n deletedPrivateMetafieldId\n userErrors {\n field\n message\n }\n }\n}\n"
Instance Method Summary collapse
Methods included from Mutation
Instance Method Details
#call(namespace:, key:, owner: nil) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'app/graphql/shopify_graphql/delete_private_metafield.rb', line 17 def call(namespace:, key:, owner: nil) input = {namespace: namespace, key: key} input[:owner] = owner if owner response = execute(MUTATION, input: input) handle_user_errors(response.data.privateMetafieldDelete) response.data = parse_data(response.data) response end |