Anchor to gateConfigurationDeletegate
gateConfigurationDelete
mutationDeprecated
Requires access scope. Also: You must have write access to
gates
to delete gate configurations.
Deletes a gate configuration. Gates API is being sunset and will be removed in a future version. Use metafields
instead for gate configuration.
Anchor to Arguments
Arguments
- Anchor to inputinput•Gate
Configuration requiredDelete Input! Specifies the gate configuration to delete by its ID.
Was this section helpful?
Anchor to GateConfigurationDeletePayload returnsGateConfigurationDeletePayload returns
- Anchor to deletedGateConfigurationIddeleted•
Gate Configuration Id The ID of the deleted gate configuration.
- Anchor to shopshop•Shop!non-null
The shop associated with the gate configuration.
- Anchor to userErrorsuser•
Errors [GateConfiguration non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
- Delete a gate configuration by ID
- Deleting a gate configuration by an incorrect ID returns an error
- gateConfigurationDelete reference
Examples
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) {
gateConfigurationDelete(input: $input) {
userErrors {
field
message
}
deletedGateConfigurationId
}
}`,
{
variables: {
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
},
},
);
const data = await response.json();
mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) {
gateConfigurationDelete(input: $input) {
userErrors {
field
message
}
deletedGateConfigurationId
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) { gateConfigurationDelete(input: $input) { userErrors { field message } deletedGateConfigurationId } }",
"variables": {
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) {
gateConfigurationDelete(input: $input) {
userErrors {
field
message
}
deletedGateConfigurationId
}
}`,
{
variables: {
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) {
gateConfigurationDelete(input: $input) {
userErrors {
field
message
}
deletedGateConfigurationId
}
}`,
"variables": {
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
},
},
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation gateConfigurationDelete($input: GateConfigurationDeleteInput!) {
gateConfigurationDelete(input: $input) {
userErrors {
field
message
}
deletedGateConfigurationId
}
}
QUERY
variables = {
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
}
response = client.query(query: query, variables: variables)
Input variables
JSON{
"input": {
"id": "gid://shopify/GateConfiguration/43548663"
}
}
Response
JSON{
"gateConfigurationDelete": {
"userErrors": [],
"deletedGateConfigurationId": "gid://shopify/GateConfiguration/43548663"
}
}