urql

What urql is
urql is a free, self-hosted GraphQL client for React, Preact, Vue, Solid, Svelte, and plain JavaScript applications. It sends declarative queries and mutations, manages caching and state, and provides an extensible way to connect an application to an API. Developers can shape request handling through exchanges, with documented options for retries, persisted queries, authentication, request policies, server-side rendering, and developer tools. The default cache stores GraphQL documents; normalized caching is available as an opt-in through the @urql/exchange-graphcache package. Graphcache can persist and restore cache state for offline use, though that support is labeled experimental. The Solid bindings include a createSubscription primitive; GraphQL subscriptions typically require WebSocket support and a subscription exchange. Browser extensions are available for debugging. The project describes urql as suitable for both an initial GraphQL project and more complex apps. It is licensed under MIT. One compatibility constraint is that first-party packages do not officially support batched queries.
Who it suits
urql suits developers building GraphQL applications with supported JavaScript frameworks or plain JavaScript. Its configurable exchanges can serve both first projects and more complex apps.
What it does well
- Free and licensed under MIT.
- Bindings cover React, Preact, Vue, Solid, and Svelte.
- Exchanges customize request handling.
- Normalized caching is available through Graphcache.
- Browser extensions support debugging.
What to know first
- First-party packages do not officially support batched queries.
- Graphcache offline support is labeled experimental.
- Subscriptions typically require WebSocket support and an exchange.
Limits
The default setup uses document caching; normalized caching requires the optional Graphcache package. Graphcache’s offline persistence is experimental, and first-party packages do not officially support batched queries.
Getting started
- Add urql to a web, API, or extension project
- Choose the binding for React, Preact, Vue, Solid, Svelte, or plain JavaScript
- Create a client for your GraphQL API
- Use the default document cache or add @urql/exchange-graphcache
- Configure exchanges for authentication, retries, persisted queries, or subscriptions
- Add the browser extension when debugging urql
Verdict
urql provides a flexible GraphQL client with document caching by default and an optional normalized cache. Developers should account for its lack of official first-party batched-query support and the experimental status of Graphcache offline support.
Questions
What does urql cost?
urql is free. It is self-hosted and licensed under MIT.
Which frameworks can use urql?
Bindings are described for React, Preact, Vue, Solid, and Svelte, with support for plain JavaScript projects.
How does urql handle caching?
Document caching is enabled by default. Normalized caching is available by adding the @urql/exchange-graphcache package.
Does urql support offline use?
Graphcache can persist and rehydrate cache state for offline use, but its documentation labels that support experimental.
Can urql handle GraphQL subscriptions?
The Solid bindings provide createSubscription. GraphQL subscriptions typically require WebSocket support and a subscription exchange.
Does urql support batched queries?
Its comparison page says urql does not officially support batched queries in its first-party packages.
Facts from urql's own pages
- Available exchanges
- Documented exchanges include retry, persisted queries, authentication, request policy, server-side rendering, and devtools exchanges. · urql.dev, 7 Oct 2026
- Client operations
- urql supports declarative GraphQL queries and mutations, caching and state management, and extensions for integrating with an API. · urql.dev, 7 Oct 2026
- Compatibility limit
- The comparison page says urql does not officially support batched queries in its first-party packages. · urql.dev, 7 Oct 2026
- Core capabilities
- urql sends GraphQL queries and mutations, manages caching and state, and provides an extensible integration point for an API. · urql.dev, 7 Oct 2026
- Customizable behavior
- Exchanges let developers customize how requests are fetched, cached, retried, authenticated, and handled. · urql.dev, 7 Oct 2026
- Customization
- Exchanges let developers customize how the client fetches, caches, and subscribes to data. · urql.dev, 7 Oct 2026
- Default cache
- The default cache uses document caching; normalized caching is available as an opt-in through Graphcache. · urql.dev, 7 Oct 2026
- Default caching
- The client uses document caching by default, and normalized caching is available through Graphcache. · urql.dev, 7 Oct 2026
- Developer tools
- The project lists browser extensions for debugging urql. · github.com, 7 Oct 2026
- Framework integrations
- The documentation describes bindings for React, Preact, Vue, and Svelte, and the comparison page also lists Next.js integration. · urql.dev, 7 Oct 2026
- Framework packages
- The project describes bindings for React, Preact, Vue, Solid, and Svelte. · github.com, 7 Oct 2026
- Graphcache
- Normalized caching is an opt-in feature provided by the @urql/exchange-graphcache package. · urql.dev, 7 Oct 2026
- GraphQL integrations
- Documented exchanges include support for persisted queries, authentication flows, retries, file uploads, and subscriptions. · urql.dev, 7 Oct 2026
- Intended users
- The project describes urql as suitable for both first GraphQL projects and more complex apps. · github.com, 7 Oct 2026
- License
- The repository lists an MIT license. · github.com, 7 Oct 2026
- Notable limit
- The comparison page says urql does not support batched queries in its first-party packages. · urql.dev, 7 Oct 2026
- Offline support
- Graphcache can persist and rehydrate cache state for offline use, and its documentation labels offline support experimental. · urql.dev, 7 Oct 2026
- Project history
- The comparison page says urql's current architecture has existed since February 2019 and its normalized cache since September 2019. · urql.dev, 7 Oct 2026
- Purpose
- urql is a customizable GraphQL client for React, Svelte, Vue, Solid, or plain JavaScript. · urql.dev, 7 Oct 2026
- Subscriptions
- The Solid bindings provide a createSubscription primitive, and the guide says GraphQL subscriptions typically require WebSocket support and a subscription exchange. · urql.dev, 7 Oct 2026
Where urql stands on Freedom251
- GraphQL Tools#23 of 32