32 points by subscriptions_gnome 6 months ago flag hide 21 comments
johnsmith 6 months ago next
Great tutorial on building a real-time chatting app with GraphQL Subscriptions! I've been looking for something like this to work on in my free time.
doejo 6 months ago next
Same here! I've been wanting to explore GraphQL more, and this looks like a perfect project to get started. Thanks for sharing!
johnsmith 6 months ago prev next
I'm also curious how the author set up the database for the chatting app. Can they share more details?
cybersedge 6 months ago next
I believe the author used MongoDB for the database, but they didn't go into much detail in the tutorial. You can always reach out to them for more information.
cybersedge 6 months ago prev next
I've been using GraphQL for a while now, and I can attest to its power and flexibility. Kudos to the author for this awesome tutorial.
harry 6 months ago next
I'm curious how the author implemented the real-time functionality. Did they use a specific library or framework?
cybersedge 6 months ago next
From my understanding, the author used the GraphQL Subscriptions specification, which is built into most GraphQL servers.
randomuser 6 months ago prev next
I'm new to Hacker News. Is there a way to upvote or like comments in this community?
jane_doe 6 months ago next
No, unfortunately we don't have a voting system here. But you can leave a comment saying you liked the previous comment and share your thoughts.
sally 6 months ago prev next
I have a question about error handling in GraphQL Subscriptions. Can anyone provide some guidance?
codewizard 6 months ago next
Sure! Error handling in GraphQL Subscriptions is typically handled using the standard GraphQL error format. Have a look at the docs for more information:
sally 6 months ago next
Thanks! I'll check out the docs and see if I can figure it out.
jerry 6 months ago prev next
Has anyone tried using GraphQL Subscriptions with a real-time messaging service like Socket.io or Firebase?
jsdev 6 months ago next
Yes, I have! The combination of GraphQL Subscriptions and Firebase provides a powerful and flexible solution for building real-time applications. You can use Firebase's Realtime Database or Firestore as the backend, and then use the GraphQL Subscriptions specification to handle the real-time communication.
jerry 6 months ago next
Thanks for the info! I'll definitely give it a try.
ally 6 months ago prev next
I loved this tutorial! It's always great to see real-world examples of new technologies like GraphQL Subscriptions. Keep up the good work!
johnsmith 6 months ago next
I agree! It's always a pleasure to learn about new technologies from practical examples. Happy hacking!
harry 6 months ago prev next
Well said! It's refreshing to see high-quality content that provides real value to the community. Great job!
charlie 6 months ago prev next
Is there a way to test GraphQL Subscriptions using a tool or framework like Jest or Mocha? I'd like to set up some tests for my real-time app.
testerpro 6 months ago next
Yes, you can use a tool like Jest or Mocha for testing your GraphQL Subscriptions. There are a few libraries and frameworks available to help you with this, including `graphql-tools` and `graphql-playground-m Middleware`. Have a look at the docs and see if you can find something that fits your needs.
codewizard 6 months ago prev next
You can also use `graphql-tools` to mock your subscriptions, and then use Jest or another testing framework to test the functionality. There are a few examples available online, so I'd recommend doing a quick search and checking them out.