Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Does it allowed to access external server from shopify functions

Does it allowed to access external server from shopify functions

AndreyZienko
Shopify Partner
13 0 3

I have additional information about every product on my server, I can access it using app proxy via javascript. Does it allowed to access this information from the shopify functions?
Is there any recommended  libraries for that?

Reply 1 (1)

Nick_Wesselman
Shopify Staff
171 43 72

Shopify functions must be deterministic and execute within 5ms. Enabling external API calls in functions would break these requirements, thus it's not something we support or intend to.

Alternatively, you can place that product information in metafields, or populate it in cart attributes or line item properties. The key is, you need to make the information available ahead of time, before the function executes, and then add it to your input query.

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog