You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for running Gadget clients in environments without a Websocket implementation
This allows use in places like Shopify's locked down extension environment, where we do have a `globalThis.fetch`, but don't have a `globalThis.WebSocket`. That's ok -- extensions don't really need to open up transactions against Gadget and so don't need websockets. In a subscriptions/livequery-y future that'd change, but investing in a whole other transport is a lot of work. So, let's at least unblock using the client for normal reads and writes!
`"Can't use this GadgetClient for this subscription-based operation as there's no global WebSocket implementation available. Please pass one as the \`websocketImplementation\` option to the GadgetClient constructor."`
"Can't use this GadgetClient for this subscription-based operation as there's no global WebSocket implementation available. Please pass one as the `websocketImplementation` option to the GadgetClient constructor."
379
+
);
380
+
}
381
+
377
382
leturl=this.websocketsEndpoint;
378
383
if(overrides?.urlParams){
379
384
constparams=newURLSearchParams();
@@ -503,6 +508,13 @@ export class GadgetConnection {
0 commit comments