"Internal Error" mobile sdk

Highlighted
New Member
2 0 0

I am trying to create a basic checkout from a single product ID to then hand off to the browser with the web URL. The graph mutation task however returns an invalid query error with an "Internal error" reason.

 

One of my request IDs from this error is: 009b1e52-0a89-4918-aa10-5dc5314282e1

 

Below is the code I am using with version 3.7.0 of the SDK:

let checkout = Storefront.CheckoutCreateInput.create(
    lineItems: .value([
        Storefront.CheckoutLineItemInput.create(quantity: 1, variantId: GraphQL.ID(rawValue: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzQ1MzM4NTg1OTg5ODY="))
    ])
)
        
let mutation = Storefront.buildMutation { $0
    .checkoutCreate(input: checkout) { $0
        .checkout { $0
            .webUrl()
        }
    }
}

let task = client.mutateGraphWith(mutation) { result, error in
    ...
}
task.resume()

 

 

0 Likes
Highlighted
New Member
2 0 0

Ok resolved. 

0 Likes
Highlighted
New Member
1 0 0

Could you please explain how did you solve it? What was causing the issue?

0 Likes