3 ms·
That's a great question. I've been considering Hasura for an upcoming app and have been prototyping things with great success. I hadn't really considered how
by DataInSolutions 8y ago
That's a great question. I've been considering Hasura for an upcoming app and have been prototyping things with great success. I hadn't really considered how it implements the subscriptions, and had assumed it worked only by observing mutations that came in through GraphQL. However that doesn't really explain how it works with subscriptions against a view.
I dug into the code a bit and think it all happens here:
https://github.com/hasura/graphql-engine/blob/master/server/src-lib/Hasura/RQL/DDL/Subscribe.hs https://github.com/hasura/graphql-engine/blob/master/server/... Which if my fledgling Haskell is correct digs into the subscription to find the sources and then adds a trigger on them.
On a related note, I've been very impressed with the Hasura GraphQL server. In particular how the authentication works with a JWT token and it's access restrictions seem pretty well thought out and flexible.
I have not yet used it in production but :fingers-crossed: it performs as well there as it has in testing and development