vendure-ecommerce / storefront-remix-starter

A storefront starter kit for Vendure built with Remix
https://remix-storefront.vendure.io
176 stars 93 forks source link

Cloudflare env is lost after a few minutes #78

Open JamesLAllen opened 3 months ago

JamesLAllen commented 3 months ago

Since CF workers are created per use, they are also lost and any globals set in the original function is also lost. The only way to propagate the VENDURE_API in the graphqlWrapper is by passing it through the context.cloudflare.env. The only fix I found for this is to pass the context along with the request in every function call.