{"repo":"nearform/graphql-hooks","free":true,"listed":false,"github":"https://github.com/nearform/graphql-hooks","clone":"git clone https://github.com/nearform/graphql-hooks.git","description":"🎣 Minimal hooks-first GraphQL client","language":"TypeScript","stars":1886,"topics":["hooks","react-hooks","react","graphql","graphql-client","hacktoberfest"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"graphql-hooks 🎣 Minimal hooks-first GraphQL client. Features - 🥇 First-class hooks API - ⚖️ Tiny bundle: only 22.9kB (7.4kB gzipped) - 📄 Full SSR support: see graphql-hooks-ssr - 🔌 Plugin Caching: see graphql-hooks-memcache - 🔥 No more render props hell - ⏳ Handle loading and error states with ease Install npm install graphql-hooks or yarn add graphql-hooks Support - Node LTS - Browsers 1%, not dead Consider polyfilling: - FormData - Promise - fetch . NOTE: A custom implementation can also be provided instead of polyfilling, see GraphQLClient Quick Start First you'll need to create a client and wrap your app with the provider: Now in your child components you can make use of useQuery Why graphql-hooks ? The first thing you may ask when seeing graphql-hooks is \"Why not use Apollo hooks?\". It's the comparison most will make. In fact, there's an article comparing the two over on LogRocket. We believe graphql-hooks is a great choice as a hooks-first GraphQL client due to its concise API and package size. In terms of performance, this is more of a grey area as we have no official benchmarks yet. If you need a client that offers more customization such as advanced cache configuration, then apollo-hooks may work out to be a good choice for your project if bundle size is not an issue. Pros Cons --------------------------- ------------------------------------- Small in size Less \"advanced\" caching configuration Concise API Quick to get up and running Table of Contents - API - Gra","default_branch":null,"files":null,"tree":[],"storefront":"/r/nearform","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nearform/graphql-hooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}