hasura / hasura/3factor

GraphQL Subscriptions in "serverless"

Open
#17 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
SCSS
Stars
180
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The documentation notes many times that this is a server-less architecture, but I'm having trouble understanding how you would achieve this without a running graphql server to handle the publisher-subscriber websocket notifications.

It also mentions numerous times that the microservices write to the state, and that the graphql API subscribe to the state changes, but this does not really fit into the graphql pub sub format either.

From all documents I've seen, the subscription logic, and subscription events are handled inside the graphql mutation functions:

```
Mutation: {
addEvent() {
do crud on db
send websocket notification to subscribers with crud data
}
}
```
The diagrams seem to point that graphql is somehow listening on the database for changes which is not the case.

Can you clarify how a graphql subscribes to state changes without actually adding the pub sub logic in the graphql layer?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.