Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createSubscriber throwing an Error #60

Open
jakiw opened this issue Nov 18, 2021 · 0 comments
Open

createSubscriber throwing an Error #60

jakiw opened this issue Nov 18, 2021 · 0 comments

Comments

@jakiw
Copy link

jakiw commented Nov 18, 2021

My code:

import { Socket as PhoenixSocket } from "phoenix";
import * as AbsintheSocket from "@absinthe/socket";
import {createSubscriber} from "@absinthe/socket-relay";
const phoenixSocket = new PhoenixSocket(webSocketUrl, {
  params: () => {
  }
});
const absintheSocket = AbsintheSocket.create(phoenixSocket)
const subscribe = createSubscriber(absintheSocket)

running with relay version 12. I get

TypeError: _ref3 is undefined

on line 49 of src/createSubscriber.js. The compiled code that throws looks like:

  142 | 
  143 | return function (_ref2, variables, cacheConfig, _ref3) {
  144 |   var operation = _ref2.text;
> 145 |   var OnUnrecoverableError = _ref3.onError,
      |                              ^  146 |       onNext = _ref3.onNext;
  147 | 
  148 |   _babel_runtime_helpers_newArrowCheck__WEBPACK_IMPORTED_MODULE_9___default()(this, _this5); // we need to place this logic here and not in ensureIsSubscription as if we
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant