Skip to content

Introduction

gpui-query is an async state management library for GPUI, the framework behind the Zed editor.

gpui-query brings the async state management patterns of TanStack Query to GPUI. It provides a declarative way to fetch, cache, synchronize, and update server state without manual lifecycle management.

  • Zero boilerplate: Define a query, bind it to a view.
  • Automatic caching: Responses are cached and deduplicated.
  • Built-in retry and error handling: Failed requests are retried with configurable policies.
  • Observer pattern: Reactively update your UI when data changes.
  • Designed for GPUI: Direct integration with GPUI’s entity and view system.