urql

Lightweight, extensible GraphQL client for React, Vue, and Svelte. Alternative to Apollo Client with a simpler, more predictable caching model. Two cache options: Document Cache (simple, per-query) and Graphcache (normalized, relational). Exchanges architecture makes urql highly customizable — add retries, auth, persistence, subscriptions as independent modules. Smaller bundle than Apollo Client with comparable features.

Evaluated Mar 07, 2026 (0d ago) v4.x
Homepage ↗ Repo ↗ Developer Tools graphql client react vue svelte caching normalized-cache typescript lightweight
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
89
/ 100
Is it safe for agents?
⚡ Reliability
84
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
87
Error Messages
82
Auth Simplicity
88
Rate Limits
95

🔒 Security

TLS Enforcement
95
Auth Strength
88
Scope Granularity
85
Dep. Hygiene
88
Secret Handling
90

Client-side GraphQL library. Auth via authExchange for secure token handling. HTTPS for all requests. MIT licensed.

⚡ Reliability

Uptime/SLA
85
Version Stability
85
Breaking Changes
80
Error Recovery
85
AF Security Reliability

Best When

You want a simpler, lighter GraphQL client than Apollo with an extensible exchanges architecture and first-class support for Vue and Svelte.

Avoid When

You need the full Apollo ecosystem (Apollo Studio, Apollo Federation, extensive DevTools) — urql is lighter but Apollo has more enterprise tooling.

Use Cases

  • Query and mutate GraphQL APIs in React with automatic caching and request deduplication using a lighter Apollo alternative
  • Use the Graphcache normalized cache for relational data where cache updates propagate correctly across queries
  • Build real-time features using urql's subscription support over WebSockets or SSE
  • Implement offline-capable GraphQL apps using urql's persistence exchange for cache persistence
  • Integrate GraphQL in Vue or Svelte applications using urql's framework-specific adapters

Not For

  • Teams committed to the Apollo Client ecosystem — Apollo has more tooling, DevTools, and community resources
  • Complex cache update scenarios requiring many custom cache.updateQuery calls — Apollo Client offers more cache manipulation options
  • Server-side rendering with complex cache hydration — Next.js + Apollo has more SSR examples

Interface

REST API
No
GraphQL
Yes
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: api_key bearer_token
OAuth: No Scopes: No

GraphQL client library — auth implemented via authExchange, a dedicated exchange for adding Authorization headers and handling token refresh.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Completely free. Maintained by Formidable Labs.

Agent Metadata

Pagination
cursor
Idempotent
Full
Retry Guidance
Documented

Known Gotchas

  • urql returns errors as values (result.error) rather than throwing — check both result.data AND result.error in every query handler
  • Document Cache (default) doesn't normalize — related data updates don't propagate; use Graphcache for normalized relational data
  • Exchanges must be composed in the correct order — requestPolicy exchange must come after authExchange in the pipeline
  • Stale-while-revalidate requires using 'cache-and-network' request policy — default 'cache-first' won't re-fetch unless cache is empty
  • urql Graphcache requires schema introspection for optimistic updates and schema-aware caching — set up schema from SDL or introspection endpoint
  • Subscriptions require a separate subscriptionExchange configuration with WebSocket or SSE transport — not automatic

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for urql.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6470
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered