{"library":"graphql-codegen-plugin-typescript-swr","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"0.8.5","tags":["javascript","graphql","codegen","typescript","ts","swr","stale-while-revalidate","react"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install graphql-codegen-plugin-typescript-swr","imports":["import { getSdkWithHooks } from './generated/sdk'","const { data, error } = sdk.useContinents('key')","const { data, size, setSize } = sdk.useMyQueryInfinite('key', getKey, variables, config)"]},{"cmd":"yarn add graphql-codegen-plugin-typescript-swr","imports":[]},{"cmd":"pnpm add graphql-codegen-plugin-typescript-swr","imports":[]}],"homepage":"https://github.com/croutonn/graphql-codegen-plugin-typescript-swr","github":"https://github.com/croutonn/graphql-codegen-plugin-typescript-swr","docs":null,"changelog":null,"pypi":null,"npm":"graphql-codegen-plugin-typescript-swr","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}