Instant GraphQL for all your data
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
App
App
Unified GraphQL API
GraphQL Service
APIs
Background jobs
GraphQL mutations
Event queue
Microservices
Serverless functions
Event queue
Microservices
Serverless functions
Event queue
Microservices
Serverless functions
App
</>
GraphQL
query / mutation
POST endpoint
Actions
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 in 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
Sync mode: Event response → GraphQL operation
mutation {
createUser(user: {...}) {
userId
events {
name
date
}
}
}
DB
</>