admin graphql api appSubscriptionTrialExtend in node js

Topic summary

A developer is encountering errors when attempting to use the appSubscriptionTrialExtend GraphQL mutation in Node.js.

Query Details:

  • Mutation attempts to extend trial by 999 days using an appSubscriptionId
  • Endpoint: https://{shop}.myshopify.com/admin/api/2023-01/graphql.json

Errors Received:

  • “Field ‘appSubscriptionTrialExtend’ doesn’t accept argument ‘input’”
  • “Field ‘appSubscriptionTrialExtend’ is missing required arguments: id, days”

Issue:
The mutation appears to have conflicting error messages—one stating the field doesn’t accept ‘input’ argument, while another claims required arguments (id, days) are missing, despite them being present in the query.

Status: The issue remains unresolved with no responses or solutions provided yet. The problem likely relates to incorrect mutation syntax or API version compatibility.

Summarized with AI on November 23. AI used: claude-sonnet-4-5-20250929.

here graphql query

mutation {
      appSubscriptionTrialExtend(days:"999", id: "${appSubscriptionId}") {
        appSubscription {
          id
        }
        userErrors {
          field
          message
        }
      }
    }

URL endpoint

https://${shop}.myshopify.com/admin/api/2023-01/graphql.json

Error getting

errors: [
    {
      message: "Field 'appSubscriptionTrialExtend' is missing required arguments: id, days",
      locations: [Array],
      path: [Array],
      extensions: [Object]
    },
    {
      message: "Field 'appSubscriptionTrialExtend' doesn't accept argument 'input'",
      locations: [Array],
      path: [Array],
      extensions: [Object]
    }
  ]