How should I query for products from Checkout UI extension?

How should I query for products from Checkout UI extension?

radpinkdream
Shopify Partner
6 0 2

Hello! I'm a first time Shopify app developer and would love some guidance and tips around querying a store's products from a Checkout UI extension. I tried to be as clear and concise with my questions:

 

- Should I be calling the Storefront API or the admin API? (I think Storefront right?)

- Do I need to first request a storefront access token? I thought these requests are rated limited, wouldn't that mean my app won't scale if I have to request a token on every buyer visit?

- How should I call the Storefront API in React? Manually using an "ApolloClient" and specifying the store uri? Or should I use the shopify-api-node sdk? I'm a bit confused on which to use, I just want to send a request to fetch products based on a tag.

- What's the best way to debug a 403 from a manual ApolloClient request? I already set `network_access = true` and enabled it in the Partner Dashboard for my app (from reading this post)

 

Thank you!

Replies 0 (0)