web-data-fetching-graphql-urql
URQL GraphQL Client Patterns
Quick Guide: Use URQL for GraphQL APIs when you need a lightweight, customizable client with exchange-based architecture. Start minimal with document caching, add normalized caching via Graphcache when needed. Bundle size is ~12KB gzipped (core), ~20KB with Graphcache. Exchange order is critical: synchronous exchanges before asynchronous, fetchExchange always last. v6+ defaults to GET for small queries - set
preferGetMethod: falseif your server only supports POST. Current version: @urql/core v6.0.1 (urql v5.0.1)
<critical_requirements>
CRITICAL: Before Using This Skill
(You MUST configure exchange order correctly - synchronous exchanges (cacheExchange) before asynchronous (fetchExchange))
(You MUST include __typename in optimistic responses for Graphcache cache normalization)
(You MUST set preferGetMethod: false if your GraphQL server does NOT support GET requests - v6+ defaults to GET for queries under 2048 characters)
</critical_requirements>