You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event-stream based GraphQL subscriptions for real-time updates
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
Conceptual Model
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Learning Rx does not have to be boring or painful working your way through theoretical sermons about esoteric concepts like category theory and duality. Life is too short for that kind of abstract nonsense.
So what is a better way to spend a hot summer day with an ice-cold drink, or dually, a cold winter night with a piping hot drink, than to learn Rx by writing an awesome platform game. In this talk, I will walk you through many of the features of Rx by way of scripting a friendly bug to run across a lavish grass meadow and jump for the stars. In just a few tens of lines of code, we will leverage operators like map, flatMap, filter, scan, and many more to react to the keyboard, animate jumps, and perform collision detection. We will even use a test scheduler to make the game run at a speed we determine so we can easily debug and test our game.
We will use RxScala and IntelliJ to develop the game, but since Rx is language and platform agnos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters