graphprotocol / graphprotocol/graph-network-subgraph

Bug - Schema names incongruent between actual vs. explorer web UI

Open
#109 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
82
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Overview

Below are 2 examples I found where the schema name of a subgraph are incongruent between the actual subgraph (i.e. what can be queried with a connection) vs. what is shown on the explorer web UI.

Impact

  • It makes the subgraph look broken
  • It wastes time debugging the issue

Examples

indexers

image

This query will fail

For example, the query below would break, despite it being written to match what is shown on the explorer UI:

indexer_query = gql(
    """
    query {
        indexer {
            id,
            stakedTokens,
            delegatedStakeRatio
          }
    }
"""
)
This query will pass
indexer_query = gql(
    """
    query {
        indexers {
            id,
            stakedTokens,
            delegatedStakeRatio
          }
    }
"""
)
transactions

image

This query will fail
query = gql(
    """
    query {
        transaction {
            id,
            blockNumber
          }
    }
"""
)
This query will pass
query = gql(
    """
    query {
        transactions {
            id,
            blockNumber
          }
    }
"""
)

Proposal

  • Make sure that the schema named found in the Web UI is congruent (==) to what a user would query
  • Check all other subgraphs + schemas for similar issues (I only found 2 in a few minutes of working on this, so my assumption is it's a larger issue)

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 with the Explorer web UI Schema section and compare its displayed names with the queryable schema for the graph-network-mainnet subgraph, using the indexers and transactions examples in this issue. Check the other subgraphs and schemas for the same mismatch; done means displayed names match the fields users can query and the failing example queries are no longer misleading.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend-api-design, frontend
Issue type
Bug
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.