Skip to content

GraphQL Subscriptions in "serverless" #17

@nickswiss

Description

@nickswiss

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions