graphprotocol / graphprotocol/indexer

Refactor CLI API calls

Open
#963 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
262
Forks
148
PR merge metrics
No merged PRs in 30d

Description

The CLI is just making API requests to GraphQL API and we should utilize codegen to generate the operation types wrapper those around fetch. Instead of using the common package and importing types. We should stop using the common package to make API calls and rely on typings. Code will be much simpler to follow, lot more typesafety improvements and can simplify testing further.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CLI entry points that make GraphQL API requests and the imports from the common package. Trace how codegen, generated operation types, and fetch are currently used before defining the affected call sites. Done means the CLI no longer uses common for API calls and relies on generated typings, with its existing tests still passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.