graphprotocol / graphprotocol/indexer

Migrate from `urql` to `graphql-yoga`

Open
#960 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

In the refactor I started to clean things up one of the things we are doing is getting rid of URQL client. Today we have a non-traditional usage of URQL client when we are utilizing it for the API layer to serve. We export a client instance and share it in both indexer-agent and indexer-cli. There is no real GraphQL validation happening today and I found inconsistencies in the API which are not being caught.

The goal with this task is to refactor to use graphql-yoga and then tests utilities will be updated to use @graphql-tools/executor-http (see yoga docs here on testing)


I am hoping that cleaning up the URQL setup cause GraphQL client we fix our memory issues cause one of the known issues on URQL which feels like what we are seeing in #41 cause we are using the version of URQL which is suspected to have leaks.

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 reviewing the refactor context in PR #859 and tracing the shared URQL client used by indexer-agent and indexer-cli. Read the GraphQL Yoga testing guidance linked in the issue, then inspect the existing test utilities. Done means the API uses graphql-yoga, tests use @graphql-tools/executor-http, and GraphQL validation exposes the current inconsistencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.