GraphQL Codegen SWR Plugin

JSON →
library 0.8.5 ·javascript
verified Jun 7, 2026

A GraphQL code generator plugin that automatically creates typed SWR hooks (useSWR, useSWRInfinite) from GraphQL operations. Version 0.8.5, actively maintained. Integrates with graphql-request and the GraphQL Codegen ecosystem. Unlike manual SWR wrapping, it auto-generates hooks with optimal caching keys and supports pagination, custom keys, and exclusion patterns. Requires graphql <17, and peer dependency on graphql-codegen typescript plugins. Ships TypeScript types.