Before we start we need to ask a few questions.
Python has been around for decades in the synchronous world. You call functions directly and everything gets processed as it’s written on the screen. Your only built-in option for running code in parallel in the same process is threads. When it comes to building web servers with python, this doesn't work because web servers should deal with many requests coming from different clients and servers should deal with these requests parallelly (asynchronously). Hence synchronous way…
A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client requests to the appropriate backend server. A reverse proxy provides an additional level of abstraction and control to ensure the smooth flow of network traffic between clients and servers.
Why do we need to do this?
Being a developer it’s always cool to explore new libraries and technology.
Being fed up with REST API’s, I moved to GraphQL last year. In simple words, GraphQL is not a 100% solution for every endpoint. When it comes to webhooks, simple public routes REST API’s suits better.
So the purpose of this post is to show how to code a simple graphql subscription in typescript.
Okay now let’s take a look at how subscription work in brief.
🍺 ➡️ 🧑💻