Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GraphQL schema to return deployment metadata (IDs, reports, "branch" color) #53

Open
neysofu opened this issue May 16, 2023 · 4 comments
Assignees

Comments

@neysofu
Copy link
Member

neysofu commented May 16, 2023

No description provided.

@fordN
Copy link
Contributor

fordN commented May 17, 2023

Proposing a schema for deployment query responses:

type Deployment { 
    id: String!
    poisCount: Int!
    pois: [POI!]
}

type POI {
    block: Block!
    hash: Bytes!
    deployment: Deployment!
    indexersCount: Int!
    allocatedTokens: BigInt
    indexers: [Indexer!]
}

type Block {
    number: Int!
    hash: Bytes!
}

type Indexer {
    id: String!
    allocatedTokens: BigInt!   
}

@fordN
Copy link
Contributor

fordN commented May 17, 2023

One thing with this proposed schema; the pois array on the Deployment type will continue to grow as the subgraph's latest block progresses. If all of these POIs are returned with a deployments() query it may not be useful.

I'd suggest we only return POIs from the latest block (for deployments queries). We could then support querying all of the POIs (for various blocks) via a POIs() query.

@fordN
Copy link
Contributor

fordN commented May 18, 2023

Thinking a bit more about my last comment. We may want to be more explicit about only exposing the latest block's unique POI values.

Proposing more specific property names:

type Deployment { 
    id: String!
    uniquePoisCount: Int!
    latestBlockPois: [POI!]
}

@neysofu
Copy link
Member Author

neysofu commented May 19, 2023

Between this and #55, I'm getting confused about what the proposed schema looks like. I'll comment on #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants