New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@virtuoso.dev/reactive-engine-query

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@virtuoso.dev/reactive-engine-query

Reactive data fetching with queries and mutations for the Virtuoso reactive engine.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
2
Created
Source

Reactive Engine Query

@virtuoso.dev/reactive-engine-query adds data fetching to @virtuoso.dev/reactive-engine-core. Queries and mutations are reactive nodes: parameters flow in, and pending/success/error results flow out to the rest of the graph.

Installation

npm install @virtuoso.dev/reactive-engine-core @virtuoso.dev/reactive-engine-query

Quick Example

import { Query } from '@virtuoso.dev/reactive-engine-query'

interface Task {
  id: string
  title: string
}

export const tasksQuery = Query<{ listId: string }, Task[]>({
  queryFn: async ({ listId }, signal) => {
    const res = await fetch(`/api/tasks?listId=${listId}`, { signal })
    if (!res.ok) {
      throw new Error('Failed to fetch tasks')
    }
    return res.json()
  },
  initialParams: { listId: '' },
})

Features

  • Query - parameterized async reads with abort signal support, retries, and typed pending/success/error results
  • Mutation - async writes with typed idle/pending/success/error results
  • executeWithRetry / defaultRetryDelay - retry utilities used by both

License

MIT

FAQs

Package last updated on 01 Aug 2026

Related posts