appSubscriptionCreate GraphQL api does not work

Solved

appSubscriptionCreate GraphQL api does not work

MasatoNohara
Tourist
5 2 0

I encountered the following error.

[GraphQL error]: Message: Internal error. Looks like something went wrong on our end.
Request ID: 01059f82-3b27-4231-9842-a2ed1d7086d3 (include this in support requests)., Location: undefined, Path: undefined

InternalServerError: GraphQL error: Internal error. Looks like something went wrong on our end.
Request ID: 01059f82-3b27-4231-9842-a2ed1d7086d3 (include this in support requests).
at Object.throw (/Users/noharamasato/Desktop/react/orion-web2/node_modules/koa/lib/context.js:97:11)
at /Users/noharamasato/Desktop/react/orion-web2/node_modules/@shopify/koa-shopify-auth/dist/src/auth/index.js:102:42
at step (/Users/noharamasato/Desktop/react/orion-web2/node_modules/tslib/tslib.js:133:27)
at Object.throw (/Users/noharamasato/Desktop/react/orion-web2/node_modules/tslib/tslib.js:114:57)
at rejected (/Users/noharamasato/Desktop/react/orion-web2/node_modules/tslib/tslib.js:105:69)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

 I used GraphQL query below.

export function RECURRING_CREATE(url) {
  return gql`
    mutation {
      appSubscriptionCreate(
        lineItems: {
          plan: {
            appRecurringPricingDetails: {
              price: { amount: 10, currencyCode: USD }
            }
          }
        },
        name: "test plan",
        returnUrl: "${url}",
        test: true,
        trialDays: 30
      ) {
          userErrors {
            field
            message
          }
          confirmationUrl
          appSubscription {
            id
          }
        }
    }`;
}

I need some helps, Thanks in advance.

 

Accepted Solution (1)

MasatoNohara
Tourist
5 2 0
Reply 1 (1)

MasatoNohara
Tourist
5 2 0

This is an accepted solution.