Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Access data from external services in Theme App Extension

Solved

Access data from external services in Theme App Extension

connyg
Shopify Partner
3 0 0

I understand that I can access data through Theme App Extensions and App Proxies.
My Theme App Ext would request something from the proxy, the proxy delivers the data/json or liquid, the frontend renders it.

Now the question:
So far I have only seen client side / browser side JS that would call the API.

Am I assuming correctly that with the standard Shopify Frontend, Theme App Extensions and App Proxies, this is the only way to go?
And for data being queried server side (not client side) I need to go with the Hydrogen Frontend (or any other that is hosted as complete web application of some kind)?

Accepted Solution (1)

Weaverse
Shopify Partner
81 26 37

This is an accepted solution.

Hey there!

 

In the usual Shopify way with Theme App Extensions and App Proxies, we mostly use client-side JavaScript. It grabs the data and displays it in the browser.

But, if you're curious about getting data on the server side (it has some neat benefits!), Hydrogen is what you're looking for. It's built with Remix and is great for server-side stuff. This can make your site faster and let you do some cool things on the backend before your users see anything.

So, a quick recap: With standard Shopify, it's mainly client-side fetching for third-party data. Want server-side handling for that data? Look at Hydrogen.

 

Hope that helps!

Helping merchants build super unique, high-performance storefronts using Weaverse + Hydrogen.
Looking for Development & Agency partners.
If you find the answer helpful, give it a thumbs up!
Our App: Theme Customizer for Shopify Hydrogen
Join our Weaverse + Hydrogen community: Weaverse Community

View solution in original post

Replies 4 (4)

Weaverse
Shopify Partner
81 26 37

This is an accepted solution.

Hey there!

 

In the usual Shopify way with Theme App Extensions and App Proxies, we mostly use client-side JavaScript. It grabs the data and displays it in the browser.

But, if you're curious about getting data on the server side (it has some neat benefits!), Hydrogen is what you're looking for. It's built with Remix and is great for server-side stuff. This can make your site faster and let you do some cool things on the backend before your users see anything.

So, a quick recap: With standard Shopify, it's mainly client-side fetching for third-party data. Want server-side handling for that data? Look at Hydrogen.

 

Hope that helps!

Helping merchants build super unique, high-performance storefronts using Weaverse + Hydrogen.
Looking for Development & Agency partners.
If you find the answer helpful, give it a thumbs up!
Our App: Theme Customizer for Shopify Hydrogen
Join our Weaverse + Hydrogen community: Weaverse Community

hieunoobpro
Shopify Partner
16 0 1

Could you help me, i can't response the request i sent from front-end. i have use  return liquid(url); 

but it's always say error 404. have i need to add anything to my return? 

connyg
Shopify Partner
3 0 0

You should start a new thread with a new question.
404 is the http error "page not found". That means your frontend is calling a URL that's not valid.

aidendev
Shopify Partner
51 1 0

Hey have you figured out how to make HTTP POST requests with App Proxies? I seem to have only gotten successful when it comes to moving data from the backend to the client, but the other way around results in Bad Requests. The calls work locally, but it seems there's an undocumented way to make it work in Shopify