https://github.com/correttojs/swr-gql
https://github.com/correttojs/swr-gql
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/correttojs/swr-gql
- Owner: correttojs
- Created: 2022-01-25T17:01:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-06T04:43:22.000Z (about 1 year ago)
- Last Synced: 2025-06-06T05:27:51.343Z (about 1 year ago)
- Language: TypeScript
- Homepage: swr-gql.vercel.app
- Size: 667 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# swr graphql wrapper
This library provides an `swr` wrapper which allows to run type-safe gql requests. It consists of
- a Graphql `fetcher` for direct requests (i.e. on ssr)
- a react `hook` wrapping swr
Both the hook and the fetcher accept a `TypedDocumentNode` generated by [gql codegen](https://www.graphql-code-generator.com/plugins/typed-document-node)