Skip to main content
Version: v2.x

Postgres: Live query subscriptions

Introduction

A Live query subscription will return the latest result of the query being made and not necessarily all the individual events leading up to the result.

By default, updates are delivered to clients every 1 sec.

See more details on subscriptions execution and performance.

Convert a query to a subscription

You can turn any query into a subscription by simply replacing query with subscription as the operation type.

Caveat

Hasura follows the GraphQL spec which allows for only one root field in a subscription.

Use cases