npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

graph-explorer-subgraph

v0.5.0-testnet-phase1

Published

Subgraph for the Graph Network

Downloads

4

Readme

Graph Network Subgraph

The Graph Network Subgraph.

Deploying

To deploy to kovan run yarn deploy-kovan. It wraps mustache for subgraph.template and addresses into one.

yarn deploy-kovan-testing is for testing on a subgraph that no one else will tie into.

Subgraph Details

Resolving names on GNS

The below shows how the following action on the GNS will result in entity changes to the subgraph.

Scenario 1 - Publishing at a brand new subgraph number

Subgraph

  • Name is checked if it exists on this graph account, and it doesn’t so it is accepted as the name for this subgraph
  • Linked to a SubgraphVersion
  • Metadata stored on the Subgraph for description, image, etc.
  • Curation
    • It will now allow for this URL to show up in the graph explorer and this name will result in GRT => nSignal => vSignal into the subgraph version. This is all setup without the name, but essentially the subgraph allows the name to resolve to this SubgraphVersion => SubgraphDeployment and acts as a proxy.

SubgraphVersion

  • Creates a new SubgraphVersion - with all new fields. Links metadata, links to a Subgraph and SubgraphDeployment

SubgraphDeployment

  • Links the SubgraphDeployment to the SubgraphVersion

Scenario 2 - Publishing a new version

Subgraph

  • Name can be changed or not changed. If not changed, do nothing. If changed, check that name is not taken. If it isnt taken, set name to the new name. Move the old name into pastNames with the final version number it was used for
  • You are linking it to a new Subgraph Version
  • Metadata for the subgraph CAN be updated here, it is optional
  • Curation
    • If the subgraphDeploymentID is changed in the contract, old vSignal is burnt, and exchanged for GRT, and then put into the new vSignal.

SubgraphVersion

  • Creates a new SubgraphVersion - with all new fields. Links metadata, links to a Subgraph and SubgraphDeployment

SubgraphDeployment

  • Links the SubgraphDeployment to the SubgraphVersion

Scenario 3 - Deprecating

Subgraph

  • Name is set to null. It must be set to null, as it is the only way that a user could use this name again
  • Old name is moved into pastNames array, with the final version number
  • To be deprecated means that the SubgraphVersion will be removed from currentVersion and into past versions. currentVersion becomes null
  • Metadata is left untouched since theres no upload to IPFS
  • Curation
    • Pulls out vSignal and nSignal and returns GRT to all users

SubgraphVersion

  • Does nothing

SubgraphDeployment

  • Does nothing

Scenario 4 - Edge case - Publishing a new name to brand new subgraph, but that name is already in use

Subgraph

  • Front end would check name and disallow. It can still be done directly to contract though. So the subgraph would cycle through all graph account subgraph names. It sees it exists. So it creates a Subgraph, but with no name.
  • Everything else the same as Scenario 1

Scenario 5 - Edge case - Publishing a new version and name to an existing subgraph, but name's already in use

Subgraph

  • Front end would check name and disallow. It can still be done directly to contract though. So the subgraph would cycle through all graph account subgraph names. It sees it exists. So it creates a new version, but keeps the old name
  • Everything else the same as Scenario 2

Scenario 6 - Edge case - Publishing a brand new subgraph with a name you don't own

Subgraph

  • Front end would check name and disallow. It can still be done directly to contract though. Subgraph would check, see the name isn't owned, and would create an unnamed subgraph (like in scenario 4)
  • Everything else the same as Scenario 2

Scenario 7 - Edge case - Publishing a new version and name to an existing subgraph, but you don't own the name

Subgraph

  • Front end would check name and disallow. It can still be done directly to contract though. So the subgraph would check, see the name isn't owned. So it creates a new version, but keeps the old name
  • Everything else the same as Scenario 2

Scenario 8 - Edge Case - Republishing an deprecated subgraph number

Subgraph

  • Just take the existing subgraph, give it a new name, ensure it is not in use
  • Give it new metadata
  • Create a new version
  • Everything else the same as Scenario 2