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
TypeError: Cannot read property 'onError' of undefined
at createSubscriber.js:49
at Object.execute (RelayNetwork.js:31)
at RelayModernEnvironment.js:264
at _subscribe (RelayObservable.js:580)
at RelayObservable.subscribe (RelayObservable.js:281)
at RelayObservable.js:196
at _subscribe (RelayObservable.js:580)
at RelayObservable.subscribe (RelayObservable.js:281)
at RelayObservable.js:293
at _subscribe (RelayObservable.js:580)
at RelayObservable.subscribe (RelayObservable.js:281)
at requestSubscription (requestSubscription.js:50)
at SubscribeComponent (SubscribeComponent.js:17)
at renderWithHooks (react-dom.development.js:16260)
at mountIndeterminateComponent (react-dom.development.js:18794)
at beginWork$1 (react-dom.development.js:20162)
at beginWork$$1 (react-dom.development.js:25756)
at performUnitOfWork (react-dom.development.js:24695)
at workLoopSync (react-dom.development.js:24671)
at performSyncWorkOnRoot (react-dom.development.js:24270)
at scheduleUpdateOnFiber (react-dom.development.js:23698)
at updateContainer (react-dom.development.js:27103)
at react-dom.development.js:27528
at unbatchedUpdates (react-dom.development.js:24433)
at legacyRenderSubtreeIntoContainer (react-dom.development.js:27527)
at Object.render (react-dom.development.js:27608)
at Module../src/index.js (index.js:8)
at __webpack_require__ (bootstrap:785)
at fn (bootstrap:150)
at Object.1 (serviceWorker.js:137)
at __webpack_require__ (bootstrap:785)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
Sorry I'm new to JS RelayNetwork expects a function with 3 arguments?
The text was updated successfully, but these errors were encountered:
You can get it to work with something like this (works with relay 9):
import{Observable}from"relay-runtime";// ...constlegacySubscribe=createSubscriber(withAbsintheSocket.create(socket));// @absinthe/socket-relay is outdated so wrap it with a fixconstsubscribe=(request,variables,cacheConfig)=>{returnObservable.create(sink=>{legacySubscribe(request,variables,cacheConfig,{onNext: sink.next,onError: sink.error,onCompleted: sink.complete});});};constenvironment=newEnvironment({network: Network.create(fetchQuery,subscribe),store: newStore(newRecordSource())});exportdefaultenvironment;
react-relay: 8.0.0
@absinthe/socket-relay: 0.2.1
environment.js
component.js
Sorry I'm new to JS
RelayNetwork expects a function with 3 arguments?
The text was updated successfully, but these errors were encountered: