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

Could not connect to websocket endpoint ws://localhost:4000/ #45

Closed
mrimran opened this issue Oct 5, 2018 · 1 comment
Closed

Could not connect to websocket endpoint ws://localhost:4000/ #45

mrimran opened this issue Oct 5, 2018 · 1 comment

Comments

@mrimran
Copy link

mrimran commented Oct 5, 2018

Unable to complete the subscriptions tutorial here https://www.howtographql.com/graphql-js/7-subscriptions/ due to this issue getting following error:

{
  "error": "Could not connect to websocket endpoint ws://localhost:4000/. Please check if the endpoint url is correct."
}

The schema that I'm sending in request is here:

subscription {
  newLink {
    node {
      id
      url
      description
      postedBy {
        id
        name
        email
      }
    }
  }
}

Here is the link to my repo: https://github.com/mrimran/hackernews

The above error is coming in Firefox whereas when I tried it on Chrome I'm facing the below issue which is already reported

#42

@mrimran
Copy link
Author

mrimran commented Oct 5, 2018

I'm closing my issue as I was making a typo which I identified by closely looking at the code again.
The mistake was in the following code snippet inside Subscription.js
return context.db.subscription.link, the typo was subscribtion :)

@mrimran mrimran 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

1 participant