Depends on: #98
Today, no .graphql operation documents exist. The codegen found no documents to process, so generated.ts only contains types, not hooks. We need to write the actual query and mutation documents so the codegen can produce usable React Query hooks.
Tasks
Create lib/graphql/operations/ with the following files:
Acceptance Criteria
generated.ts exports typed React Query hooks for every query and mutation
- Each generated hook uses the custom
fetcher from lib/graphql/client.ts
Depends on: #98
Today, no
.graphqloperation documents exist. The codegen found no documents to process, sogenerated.tsonly contains types, not hooks. We need to write the actualqueryandmutationdocuments so the codegen can produce usable React Query hooks.Tasks
Create
lib/graphql/operations/with the following files:bounty-queries.graphqlbounty-mutations.graphqlsubmission-mutations.graphqlBountyFields,SubmissionFieldsto avoid field duplicationnpm run codegen→ verify hooks likeuseBountiesQuery,useCreateBountyMutationare generatedAcceptance Criteria
generated.tsexports typed React Query hooks for every query and mutationfetcherfromlib/graphql/client.ts