urql GraphQL Client

urql GraphQL Client

formidable.com

1

About this website

urql is a highly customizable and versatile GraphQL client created by Formidable Labs in 2018, designed for React, Preact, Svelte, and Vue applications, providing a normalized cache, document caching, request deduplication, offline support, and an extensible exchange system, serving as a lightweight alternative to Apollo Client with a smaller bundle size and more flexible architecture, adopted by companies including Atlassian and Microsoft. The exchange system is the core extensibility mechanism, with built-in exchanges including the cache exchange for normalized caching, the fetch exchange for executing HTTP requests, the subscription exchange for WebSocket subscriptions, the retry exchange for automatic retry, the auth exchange for authentication, and the multipart exchange for file uploads, enabling developers to compose a custom request pipeline by chaining exchanges that transform, intercept, and handle GraphQL operations as they flow through the client. The normalized cache stores entities by type and identifier rather than by query, enabling automatic cache updates when related data changes across different queries, with cache invalidation, optimistic updates, and partial data reconstruction, while the document cache provides simpler response-level caching for read-heavy applications. The hooks API provides useQuery for queries with automatic execution, useMutation for mutations, and useSubscription for subscriptions, with automatic re-rendering when results update. The SSR support through server-side rendering. The offline persistence through custom exchanges. The custom scalars support. The error handling through GraphQLError. Designed for React developers using GraphQL.

Tags & Categories

Categories

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!