-
Notifications
You must be signed in to change notification settings - Fork 2k
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 Server returns "Must provide document." for Apollo v3 #5852
Comments
Could you please have a look on this one @glasser? I have the exact same issue. |
Same here. I don't know what I am doing wrong. I also have found this issue on stackoverflow: |
Can you make this available as a full cloneable repository or codesandbox.io sandbox? It's a lot easier to debug when we know we're running the same version of all dependencies due to having the package.json and lock files included. |
Just use this official example and upgrade apollo-server-express to the latest version: It works for 3.2.1 that is used by the sample. |
Sorry, are you saying that this works in 3.2.1 and not in later versions? It's a lot easier for me to follow if there's no creativity involved (ie, literally just |
(I also don't believe that there was an Apollo Server 3.2.1? This sort of question is why full reproductions help.) |
Sorry 3.1.2, it is the version used by the sample. Just change the version of apollo-server-express to "^3.4.0" in the package.json, which is the latest version. |
You will see that it works for 3.1.2, but not for the latest version 3.4.0. |
I upgraded that example to apollo-server-express 3.4.0 and was able to successfully run a subscription via Explorer. I'm sure this is a real problem because three of you have reported it, but I can't make any progress without a reproduction that doesn't require me to apply any creativity or hope that our package lock files manage to be exactly identical due to sheer luck. Looking forward to reopening this issue when it has a reproduction. |
(I bet it is not a coincidence that this is right after graphql@16 was released — did you install graphql@16 |
Yes |
You're right, I made some tests: It fails with graphql 16, but works for graphql 15.5.1. |
@janandreschweiger Try upgrading subscriptions-transport-ws to v0.11.0 and see if that helps. |
Thank you @glasser, this solved my issue. |
Our firm migrated yesterday to Apollo v3 (apollo-server-express v3.4.0).
Unfortunately, subscriptions return the following response:
We made following observations:
This is my index.mjs:
My resolvers.mjs:
We are happy for any help. Thank you!!
The text was updated successfully, but these errors were encountered: