Open source • GraphQL engine • On Postgres
users {
name
posts {
title
content
tags {
name
}
}
}
SELECT
users.name
posts.title
posts.content
tags.name
FROM
users, posts, tags
WHERE
users.id = posts.author_id,
posts.id = tags.post_id
mutation createUser(user: {...}) {
...
}
{
"input": {
"user": {...}
},
"session_variables": {...}
}
Async Mode: Event captured → Persisted → Event delivered
{ ... }
Event store
Event store
Sync Mode: Event captured → Event delivered
{ ... }
Async Mode: event is put back the event store
Event store
{ ... }
Event store
Event store
Sync mode: Hasura keeps the request open till receiving a response from the handler
{ ... }
Async mode: Event response → GraphQL subscription
subscription {
createUserResult(actionId: "") {
userId
events {
name
date
}
}
}
Event store
Postgres DB
Async mode: Event response → GraphQL mutation
mutation {
createUser(user: {...}) {
userId
events {
name
date
}
}
}
Postgres DB