{"repo":"croutonn/graphql-codegen-plugin-typescript-swr","free":true,"listed":false,"github":"https://github.com/croutonn/graphql-codegen-plugin-typescript-swr","clone":"git clone https://github.com/croutonn/graphql-codegen-plugin-typescript-swr.git","description":"A GraphQL code generator plug-in that automatically generates utility functions for SWR.","language":"TypeScript","stars":101,"topics":["graphql","graphql-code-generator","swr","stale-while-revalidate","react","nextjs"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"graphql-codegen-plugin-typescript-swr A GraphQL code generator plug-in that automatically generates utility functions for SWR. Table of Contents - API Reference - excludeQueries - useSWRInfinite - autogenSWRKey - Config Example - Usage Examples - Pagination - Authorization - Next.js API Reference excludeQueries type: string string[] default: \"\" Exclude queries that are matched by micromatch (case-sensitive). useSWRInfinite type: string string[] default: \"\" Add useSWRInfinite() wrapper for the queries that are matched by micromatch (case-sensitive). autogenSWRKey type: boolean default: false Generate key to use useSWR() automatically. But, ​the cache may not work unless you separate the variables object into an external file and use it, or use a primitive type for the value of each field. Config Example Usage Examples For the given input: It generates SDK you can import and wrap your GraphQLClient instance, and get fully-typed SDK based on your operations: Pagination codegen.yaml Functional Component Authorization Next.js","default_branch":null,"files":null,"tree":[],"storefront":"/r/croutonn","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/croutonn/graphql-codegen-plugin-typescript-swr/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."}