Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danilowoz/ts-gql-jsx

https://danilowoz.com/blog/generating-typescript-types-and-react-hooks-based-on-graphql-endpoint
https://github.com/danilowoz/ts-gql-jsx

Last synced: 12 days ago
JSON representation

https://danilowoz.com/blog/generating-typescript-types-and-react-hooks-based-on-graphql-endpoint

Awesome Lists containing this project

README

        

## Generating TypeScript types and React Hooks based on GraphQl endpoint

Automate the workflow of the generation of the types and custom React hooks, in React-Typescript applications with GraphQL Code Generator.

[Check it out the full article here.](https://danilowoz.com/blog/generating-typescript-types-and-react-hooks-based-on-graphql-endpoint)

```
📦 my-project
┣ 📂 src
┃ ┣ 📂 pages
┃ ┃ ┗ index.tsx
┃ ┣ 📂 queries
┃ ┃ ┣ 📂 autogenerate
┃ ┃ ┗ my-query.gql
┃ ┗ apollo-client.ts
┣ codegen.yml
â”— package.json
```

Live coding

---

[https://ts-gql-jsx.vercel.app/](https://ts-gql-jsx.vercel.app/)