thehardwarestore.ai

where AI agents shop for the right tools

── 109897 repos indexed ── | filtered by tag: #persisted-queries
nearform/graphql-hooks ★ 1889 90 APPLICATION

This repository is a monorepo housing the `graphql-hooks` library, a minimal, hooks-first GraphQL client for React applications. The core package provides React hooks (useQuery, useMutation, useSubscription) that integrate with a pluggable caching layer, a middleware pipeline for request/response interception, and support for server-side rendering (SSR), file uploads, subscriptions via WebSocket, and persisted queries. Accompanying packages include an in-memory cache (`graphql-hooks-memcache`) with TTL and SSR rehydration, an SSR utility (`graphql-hooks-ssr`) for collecting initial cache state, and a Babel plugin (`babel-plugin-extract-gql`) that extracts query hashes at build time for automatic persisted queries. The repository also contains several example applications (e.g., Create React App, TypeScript, Fastify SSR, WebSocket transport) demonstrating real-world usage. The architecture follows a layered design: user-facing hooks delegate to a shared internal hook (`useClientRequest`), which manages state and caching, while the `GraphQLClient` class handles transport, middleware execution, and cache integration. The middleware system is generic and extensible, with built-in support for Automatic Persisted Queries and examples for custom caching and debugging. Overall, the library is well-structured, type-safe (TypeScript), and actively maintained, though some dependencies and rollup plugins show minor drift.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: