just sharing a GraphQL setup I like with a friend
Sup mate
Press . to open this repo in GitHub Codespaces.
Take a look at ./graphql-codegen.yml and ./package.json
Then check out *.gql files and the generated code in *.generated.ts
"postcodegen"
script,The project isn't very impressive, but if you want to play with it, you can run it with:
pnpm install
- installs dependenciespnpm dev
- runs Vite development serverIf you click the flower icon in the app, you'll notice React Query DevTools.
We're defining our own GraphQL client "fetcher" function for React Query hooks in /src/gqlClient.ts
compilerOptions.paths
in tsconfig.json and the usage ofvite-tsconfig-paths
in vite.config.ts