Skip to main content

GraphQL Client Configurator

Choose your GraphQL client and configure it visually. Generate production-ready TypeScript setup code for Apollo Client, urql, or graphql-request with auth, error handling, and caching.

✓ Apollo / urql / graphql-request ✓ Auth headers builder ✓ Cache policy configurator

Connection

Authentication

Cache & Error Handling

Generated Code

 

Frequently Asked Questions

Which GraphQL client should I use?▼

Apollo Client is the most feature-rich: caching, local state, subscriptions, DevTools. Best for complex apps. urql is lighter, more composable, and excellent for Next.js/RSC. graphql-request is minimal — just sends requests, no cache. Use Apollo for enterprise apps, urql for modern React/Next.js, graphql-request for simple scripts or server-side fetching.

What is the Apollo InMemoryCache?▼

InMemoryCache is Apollo's normalized cache. It stores query results by type and ID (e.g., Todo:1, User:42). When a mutation updates an object, any query containing that object automatically updates — no manual cache management needed. Configure typePolicies to control how objects are identified and merged.

What are Apollo cache policies?▼

cache-first (default): read from cache, only fetch if missing. network-only: always fetch, write to cache. cache-only: never fetch, throw if missing. no-cache: always fetch, never write. cache-and-network: return cache immediately, then update from network. Use cache-and-network for data that should feel instant but stay fresh.

How does urql handle caching differently?▼

urql uses exchanges (middleware-like composable layers). The default Document Cache caches by query + variables hash — simple but effective. The Normalized Cache (from @urql/exchange-graphcache) works like Apollo's InMemoryCache with entity normalization. The key difference: urql's architecture lets you swap or compose caching strategies without changing your components.

What is graphql-request best for?▼

graphql-request is a minimal GraphQL client (~2KB) with zero configuration. It's perfect for: server-side data fetching in Next.js, scripts, CLI tools, or any scenario where you want to send a GraphQL query without managing a cache. It pairs well with TanStack Query or SWR — you use graphql-request as the fetcher function.

How do I handle authentication headers in GraphQL clients?▼

Apollo: pass headers in the authLink using setContext. urql: use fetchOptions to return dynamic headers. graphql-request: pass headers directly to the GraphQLClient constructor or per-request. For all clients, read the auth token from localStorage/cookies in the header function — never hardcode tokens in source code.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →