Realtime
Stream live updates from any deployed read query.
Open views share one connection and advance together on each commit. Revoking read access drops restricted rows right away, and any readable record can host a presence room.
Read the live queries docsLive queries
Receive compact row diffs as transactions commit.
Subscribers receive the initial query result followed by minimal row patches over one shared stream as commits land. Lists, counters and detail panes on a screen advance together on one snapshot.
Live streams APIimport { deployed } from 'napalm-client' const subscription = napalm.subscribe(deployed('listNotes'), {}, { onRows: ({ rows }) => renderNotes(rows), onError: (error) => reportError(error),}) // Later, when the view unmounts:subscription.close()Live access enforcement
Pull revoked records off the screen on the same commit.
Every outbound patch re-checks your schema’s access policies for that subscriber. Unsharing a document or revoking a credential removes restricted rows from open streams immediately.
update Notefilter .id = <uuid>$noteset { shared_with -= (select Person filter .id = <uuid>$person) }CLI watcher
Inspect live query patches straight from your terminal.
Run napalm watch while developing to print the initial rows and watch real-time commit diffs arrive as you test mutations, triggers and access rules.
napalm watch notes "select Note { title, updated_at }"Presence rooms
Broadcast cursors and room state on any readable record.
Join a record’s room over the same live connection to share cursors, typing status and peer messages without database writes. Callers without read access receive not_found, and members disconnect if access ends.
Presence roomsconst room = napalm.presence(noteId) room.set({ cursor: { line: 18, ch: 4 }, status: 'editing' })room.send({ kind: 'selection', range: [120, 148] }) const stopPeers = room.onChange((peers) => renderCursors(peers))const stopMessages = room.onMessage(({ data }) => applySelection(data)) // When the editor closes:room.leave()UI bindings
Drop generated hooks into React, Next.js and Flutter.
napalm generate emits typed React hooks and Dart streams for every read-only query. Mounted components share one connection, and hidden tabs pause automatically.
import { useGetNote } from './napalm/hooks' export function NoteView({ id }: { id: string }) { const { rows } = useGetNote({ id }) return <h1>{rows?.[0]?.title}</h1>}Stream capacity
Support 1,000 active subscriptions per GiB of engine memory.
Active subscriptions draw from one pool across your query engines with zero per-message fees. Scaling engine memory raises the ceiling online, and reconnecting streams resume from their last bookmark.
1,000subscriptions per GiB of engine memory