Skip to content

Supported networks table #975

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Supported networks table #975

wants to merge 5 commits into from

Conversation

hayderkg
Copy link
Contributor

@hayderkg hayderkg commented Jun 5, 2025

Implements logic to display Check vs double check icons in NetworksTable based on service support levels from network registry

image

@hayderkg hayderkg requested a review from a team as a code owner June 5, 2025 14:07
@benface
Copy link
Contributor

benface commented Jun 5, 2025

@hayderkg – Can you please add a screenshot to your PR? 🙏

@hayderkg
Copy link
Contributor Author

hayderkg commented Jun 5, 2025

@hayderkg – Can you please add a screenshot to your PR? 🙏

Done! 🙌 @benface

Comment on lines +76 to +96
"tableLegend": {
"subgraphs": {
"basic": "Subgraph Studio (No issuance)",
"full": "The Graph Network (Issuance)"
},
"substreams": {
"basic": "Base",
"full": "Extended (EVM Only)"
},
"firehose": {
"basic": "Base",
"full": "Extended (EVM Only)"
},
"tokenApi": {
"supported": "All endpoints supported"
},
"icons": {
"checkmark": "Checkmark",
"checkmarks": "Checkmarks"
},
"legendTitle": "Table Legend"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Comment on lines +44 to +65
// Suport level for services
export const getSubgraphsSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const hasSubgraphs = Boolean(network.services.subgraphs?.length || network.services.sps?.length)

if (!hasSubgraphs) return 'none'
if (network.issuanceRewards) return 'full'
return 'basic'
}

export const getSubstreamsSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const substreamCount = network.services.substreams?.length || 0
if (substreamCount === 0) return 'none'
if (substreamCount >= 2) return 'full'
return 'basic'
}

export const getFirehoseSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const firehoseCount = network.services.firehose?.length || 0
if (firehoseCount === 0) return 'none'
if (firehoseCount >= 2) return 'full'
return 'basic'
}
Copy link
Contributor

@benface benface Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Suport level for services
export const getSubgraphsSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const hasSubgraphs = Boolean(network.services.subgraphs?.length || network.services.sps?.length)
if (!hasSubgraphs) return 'none'
if (network.issuanceRewards) return 'full'
return 'basic'
}
export const getSubstreamsSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const substreamCount = network.services.substreams?.length || 0
if (substreamCount === 0) return 'none'
if (substreamCount >= 2) return 'full'
return 'basic'
}
export const getFirehoseSupportLevel = (network: Network): 'none' | 'basic' | 'full' => {
const firehoseCount = network.services.firehose?.length || 0
if (firehoseCount === 0) return 'none'
if (firehoseCount >= 2) return 'full'
return 'basic'
}
export const getSubgraphsSupportLevel = (network: Network) => {
const hasSubgraphs = Boolean(network.services.subgraphs?.length || network.services.sps?.length)
if (!hasSubgraphs) return 'none'
if (network.issuanceRewards) return 'full'
return 'basic'
}
export const getSubstreamsSupportLevel = (network: Network) => {
const substreamCount = network.services.substreams?.length || 0
if (substreamCount === 0) return 'none'
if (substreamCount >= 2) return 'full'
return 'basic'
}
export const getFirehoseSupportLevel = (network: Network) => {
const firehoseCount = network.services.firehose?.length || 0
if (firehoseCount === 0) return 'none'
if (firehoseCount >= 2) return 'full'
return 'basic'
}

Or do you feel that the return types are helpful? Don't want to insist, I know there's some subjectivity on that topic... but I truly don't see the point; if someone accidentally changes the type that's returned in the future, I feel like TS will catch it when we actually use the value (e.g. if (network.subgraphsSupportLevel === 'none') will error if subgraphsSupportLevel can never be none). I definitely have a bias for "less code is better", but I swear there are cases where I find return types helpful; I just fail to see this as one of them.

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

Successfully merging this pull request may close these issues.

2 participants