Open-source project
urql-graphql/urql avatar
urql-graphql/urql

urql: one package for five frameworks, with normalized caching as an exchange

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

8,985 stars480 forksTypeScriptMIT

At a glance

What is it?
urql is a GraphQL client for React, Preact, Vue, Solid and Svelte whose behaviour is changed by inserting exchanges into a pipeline, which is also where normalized caching lives. Each package versions on its own, so pinning urql does not pin @urql/core or graphcache.
Who is it for?
urql suits a team that wants one GraphQL client across React, Preact, Vue, Solid or Svelte and intends to grow into normalized caching rather than start there. It suits you less if you want the framework bindings and the cache in one versioned unit, or if you decide between GraphQL clients from a README, because this repository names no alternative and documents no performance.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 6, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • urql-graphql/urql8,985 ★ · +8
Star history
Repository2026-09-222026-11-06
urql-graphql/urql9k9k

8 Stars in the last 45 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

One package, five framework bindings, and no API surface in the README

The pitch in a single line is that one package gets you a working GraphQL client in React, Preact, Vue, Solid and Svelte. What the README does not give you is any of the API: no hook names, no client options, no query syntax. It is a signpost, and it points at urql.dev/goto/docs, where the sections are ordered by how soon you need them. Basics holds the Getting Started guide. Architecture explains how the library functions and is built, which is the page to read before you write your own exchange. Advanced covers uncommon cases you do not need on day one. Graphcache documents normalized caching, and API holds the reference for each individual package. The raw markdown for all of it sits in this repository's docs folder, and the APIs are additionally self-documented with TSDocs, so a TypeScript language server shows the documentation when you hover over the code.

Exchanges are the extension point, and the default already caches

urql is built to be customizable, and the mechanism it names is exchanges. An exchange sits in the request pipeline and can see, alter or short-circuit what happens, which is why the documentation has a page on authoring them. The default is deliberately plain: logical but simple behaviour plus document caching, where results are stored per document rather than per entity. Normalized caching is not part of that default. It arrives by adding @urql/exchange-graphcache, a separate package in the same repository, and the Graphcache docs section describes what it enables. The practical consequence is a two-stage decision. Start on the default document cache and you keep the simple behaviour; add graphcache and you take on a package with its own version number and its own documentation, and the entity-level behaviour changes under you. Debugging has its own tooling: the urql devtools browser extensions.

Three version lines move independently of each other

This is a monorepo where the packages are released separately, and the recent tags show it: @urql/exchange-graphcache at 9.0.2 on 2026-10-02, urql at 5.0.4 on 2026-08-21, and @urql/core at 6.0.3 on 2026-06-22. Those numbers do not line up, and they are not meant to. Every package carries its own CHANGELOG.md with its historical entries, and the one for core lives at packages/core/CHANGELOG.md, so a cache change and a core change are documented in different files. Releases are prepared with changesets, where each pull request adds a changelog entry, and a Version Packages pull request is what merges to publish new versions; @canary releases on npm give you a preview of everything already merged. For an adopter that means a lockfile is the only place where these three versions are pinned together, and a major bump in one package does not drag the others along. For an upgrader it means the change notes you want are the per-package ones.

No install command appears anywhere in the README

Worth stating plainly, because it is unusual: the README gives no package manager command. There is no install line to copy, no yarn or npm invocation, and no version range. What it offers instead is the documentation link, where Basics contains the Getting Started guide, and a mention of npm in a different context, the @canary releases you can install for a preview of merged changes. The repository itself is a pnpm workspace, with pnpm-workspace.yaml and pnpm-lock.yaml at the top level, which tells you what the maintainers use but not what you should type. So the first few minutes with this library are spent in the documentation rather than in a terminal.

Seventeen example apps cover the features the feature list skips

The examples directory is the most useful part of the repository, and it is not mentioned in the README's feature bullets at all. There are seventeen runnable applications: with-apq, with-defer-stream-directives, with-graphcache-pagination, with-graphcache-updates, with-infinite-pagination, with-multipart, with-next, with-pagination, with-react, with-react-native, with-refresh-auth, with-retry, with-solid, with-solid-start, with-svelte, with-subscriptions-via-fetch and with-vue3. Each name is a decision you would otherwise have to make blind. Automatic persisted queries, the defer and stream directives, multipart uploads, subscriptions delivered over fetch, a token refresh flow and retry behaviour are all questions a GraphQL team asks in the first week, and here each has an example app to read. examples/README.md and a pnpm-workspace.yaml live alongside them, so the examples are a workspace of their own rather than a folder of snippets.

The toolchain is pnpm, vitest, tsc and a scripted build

package.json is marked private and the scripts show how the maintainers work. Type checking is a bare tsc, linting is eslint over js, jsx, ts and tsx, and both the build and the packaging step are node scripts rather than shell one-liners:

bash
node ./scripts/actions/build-all.mjs
node ./scripts/actions/pack-all.mjs
node ./scripts/prepare/postinstall.js

Tests run under vitest, configured by vitest.config.ts, through a script written as test -z $CI && vitest || vitest, which lands on vitest whether or not the CI variable is set, so the local and CI paths differ only in name. Publishing runs changesets and then a jsr step filtered to @urql/core alone, which is how that package reaches JSR. Formatting is enforced on commit: husky installs a pre-commit hook that runs lint-staged, which applies eslint with --fix to JavaScript and TypeScript and prettier to JSON and Markdown, with prettier configured for single quotes, no parentheses around single arrow arguments and es5 trailing commas.

Nothing here tells you which GraphQL client to pick

A reader arriving with a choice to make will find the repository quiet on it. No alternative client is named, no comparison table exists, no bundle size or render benchmark appears, and the framework bindings and the cache are described only in terms of what they do rather than how they compare. The only signals offered are institutional: the project was founded by Formidable and is actively developed by the urql GraphQL team, with BigCommerce, WunderGraph, The Guild and BeatGig listed as sponsors. Those tell you who maintains the code, not what it costs you at runtime. Two further gaps are worth knowing. The v4 migration guide is posted as a GitHub issue rather than living in the documentation, so a major upgrade means reading a long issue, and every API is documented with TSDocs, which means the behaviour you depend on is spread across the docs site, the doc comments and the per-package changelogs.

A cache bug belongs to exchanges, a request bug belongs to packages

The directory layout tells you where a change has to go. Top level there are packages, exchanges, docs, examples and scripts, plus the workspace files pnpm-workspace.yaml and pnpm-lock.yaml, the build configuration tsconfig.json, the deployment file vercel.json, vitest.config.ts, and the community files CONTRIBUTING.md and CODE_OF_CONDUCT.md. With graphcache shipped from exchanges and the framework bindings and core shipped from packages, a bug report about entity normalization is a different piece of work from a bug report about request handling, and they will be triaged against different changelogs. The .changeset directory at the top level is the same story from the contributor's side: a change to a package starts as a changelog entry there. For an adopter, the layout is a useful hint about scope, since the number of packages you touch decides how much of a major version an upgrade actually is.

Editorial conclusion

urql suits a team that wants one GraphQL client across React, Preact, Vue, Solid or Svelte and intends to grow into normalized caching rather than start there. It suits you less if you want the framework bindings and the cache in one versioned unit, or if you decide between GraphQL clients from a README, because this repository names no alternative and documents no performance. Before adopting it, check three things: which of urql, @urql/core and @urql/exchange-graphcache you actually install, since their version numbers move independently, whether the default document cache is enough or you need graphcache from day one, and whether the behaviour you depend on is written down in the docs sections rather than only in an exchange's changelog.

Frequently asked questions

Which frameworks does urql support?

One package covers React, Preact, Vue, Solid and Svelte. Its default behaviour is document caching, and normalized caching is added through the separate @urql/exchange-graphcache package.

How is urql customised?

Through exchanges, which sit in the request pipeline and can see or change what happens, and the docs have a section on authoring them. Debugging is done with the urql devtools browser extensions.

How are urql releases versioned?

Each package versions on its own. Recent tags include @urql/exchange-graphcache 9.0.2, urql 5.0.4 and @urql/core 6.0.3, every package has its own CHANGELOG.md, and @canary releases on npm preview merged changes.

Does the urql README show how to install it?

It contains no install command. The entry point it gives is the documentation at urql.dev/goto/docs, where the Basics section holds the Getting Started guide and the API section covers each package.

Where can I see urql used for specific tasks?

The examples directory ships seventeen runnable apps, among them with-apq, with-defer-stream-directives, with-multipart, with-refresh-auth, with-retry, with-infinite-pagination, with-graphcache-updates, with-subscriptions-via-fetch and with-vue3.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. urql-graphql/urql on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/urql-graphql-urql.svg)](https://hysenlabs.com/projects/urql-graphql-urql)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/urql-graphql-urql.svg)](https://hysenlabs.com/projects/urql-graphql-urql)

Was this useful?