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

Subscription error with the latest version of prisma-binding package #42

Closed
mrkvon opened this issue Aug 26, 2018 · 3 comments
Closed

Comments

@mrkvon
Copy link

mrkvon commented Aug 26, 2018

When I upgrade prisma-binding from ^2.0.2 to ^2.1.4

newLink (and newVote) subscriptions fail with

{
  "error": {
    "name": "TypeError",
    "message": "Cannot read property 'link' of undefined"
  }
}

This error happens when I follow the tutorial today. It is not an issue with the repository itself, but with the related tutorial which seems to not reflect some recent breaking changes between minor versions of prisma-binding

reproduce

  1. install this repository, yarn dev, go to playground, sign up, provide authorization header
  2. test that newLink subscription works
  3. yarn add graphql-yoga@latest
    yarn add prisma-binding@latest
  4. restart with yarn dev
  5. test newLink subscription again and observe the error
@mrkvon mrkvon changed the title Subscription error with the latest version of prisma-binding Subscription error with the latest version of prisma-binding package Aug 26, 2018
@mrkvon
Copy link
Author

mrkvon commented Aug 26, 2018

@mrimran
Copy link

mrimran commented Oct 5, 2018

I was getting the same issue and by closely analyzing I came to know that I'm making a typo here

return context.db.subscription.link, the typo was subscribtion :) The issue no more comes on my end.

@mrkvon
Copy link
Author

mrkvon commented Oct 5, 2018

With prisma-binding^2.1.6 everything works as expected again. Either upgrading the package or generating binding code again may have helped.
Closing.

@mrkvon mrkvon closed this as completed Oct 5, 2018
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

2 participants