-
Notifications
You must be signed in to change notification settings - Fork 860
Get an error in subscription #2920
Comments
Okay, it is very very weird. I COPIED Commit with COPIED P.S. I don't think it is because of my laptop, it works like that even on Heroku |
I am having the same issue. Wiping I'm running |
@frankdugan3 do you use Here is a single command to clone repository and checkout to certain branch: Also, a little bit more explanation of this behavior: dotansimha/graphql-yoga#432 |
@SilencerWeb I'm using |
I've been experiencing similar problems myself using prisma-binding 2.1.4 and apollo-server 2.0.4. I happened to have another test project I've been playing around with running apollo-server 2.0.0 and prisma 2.1.3 and using those I was not getting this error. So I tried downgrading prisma-binding and apollo-server to the same versions as in my test project and doing so I was not getting this error anymore. Would be interesting to know if you are able to reproduce this if you've downgraded to "prisma-binding": "2.1.3". |
Downgrading to |
Downgrading to But note this: if your |
I already found the root cause of this issue in prisma-labs/prisma-binding#229 (comment) , will be good if a contributor of this project (like @marktani ) can point what fix implement |
This should be fixed now, as prisma-labs/prisma-binding#229 is fixed. |
This is fixed and released in |
Describe the bug
On frontend I get an error
Cannot read property 'task' of undefined
in the subscription. I didn't get it before, I guess it started to behave like that after I upgraded dependencies or added new subscriptions for another type (same error -Cannot read property 'user' of undefined
). I tried to downgrade dependencies, revert commits both on frontend and backend - it didn't help.Here is an example of subscription and I think the error is here because somehow
subscription
isundefined
:To Reproduce
Steps to reproduce the behavior:
git clone https://gitlab.com/SilencerWeb/dailyq-api.git
cd dailyq-api && git checkout development && yarn install && yarn start
To make this example work, you need to provide variables
DEVELOPMENT_PRISMA_ENDPOINT
(url to prisma endpoint),DEVELOPMENT_PRISMA_SECRET
(any string) andDEVELOPMENT_APP_SECRET
(any string) in.env
and then runprisma deploy
.Expected behavior
Shouldn't throw an error
Cannot read property 'task' of undefined
and I should recieve data in the subscription on frontendScreenshots
![image](https://user-images.githubusercontent.com/20713191/44099374-eae96496-9ffb-11e8-9cf8-f2d8ff52afc9.png)
Screenshot of the error on frontend:
Versions (please complete the following information):
package.json before and after upgrade, doesn't work in both cases.
UPDATE:
Here is another repository with the same structure and same versions of packages. Subscriptions defined identically in both repositories, but in this one they work.
Also, when I make
console.log(context)
inside the subscription, I get such message:(node:12649) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated
in the first repository but I do not get it in the second repository.The text was updated successfully, but these errors were encountered: