how to use shopify graphql api on checkout ui extensions
i am working on the checkout ui extension that targets order status and thank you page. I want to make authenticated calls like for instance editing an irder using graphql. How do I do it using Shopify Grphql API
1 Reply
Hello,
From a Checkout UI Extension, there's no way to authenticate requests to Gadget since there aren't any session tokens or other information that could assign the call to an authenticated role.
The best thing that you could do is make a global action, pass the shopId as a parameter and run
connections.shopify.forShopId
Note that this would be given access under the unauthenticated role so you might need to add some other sort of protections. Maybe build a JWT "auth" system where you create the JWT when first loading up the extension and pass it with every request to the backend