Using The Graph

GoldSky is an easy to use alternative to The Graph for indexing on-chain data.

Official Subgraphs

1. Lightbridge

2. DAO

Deploy your own Subgraphs

The goldsky-CLI is required to deploy to GoldSky. Make sure that you have various packages installed. Please refer to the official documentation.

curl | sh

The Graph

If you are using The Graph right now, you can easily migrate your existing subgraphs over to Goldsky. The official GoldSky documentation is very helpful in that matter.

First you need to login to your GoldSky account:

goldsky login

Then you can deploy your subgraph in one of the following ways (taken from the official GoldSky docs):

  1. Build and deploy from source

cd <your-subgraph-directory>
graph build # Build your subgraph as normal.
goldsky subgraph deploy my-subgraph/1.0.0
# Can add --path <build target> to target a specific subgraph build directory
  1. Migrate from The Graph's hosted service

goldsky subgraph deploy your-subgraph-name/your-version --from-url <your-subgraph-query-url>
  1. Migrate from any existing endpoint

goldsky subgraph deploy your-subgraph-name/your-version --from-ipfs-hash <deployment-hash>
  1. Build and deploy from ABI + contract address

goldsky subgraph deploy your-subgraph-name/your-version --from-abi <path-to-config-file>

NOTE: When you log into, you may have more than one account. Make sure that you are using the ACCESS_TOKEN associated with the correct account, otherwise your depoyment will fail. You can cycle through your multiple accounts by clicking on your GitHub user ID or whatever other account is displayed next to your user Avatar.

Here is some example queries to get you started:

# L2 Boba Mainnet Query

  curl -g -X POST \
    -H "Content-Type: application/json" \
    -d '{"query":"{ proposalQueueds {id eta, transactionHash_}}"}' \

To get the endpoints you can either login on the official GoldSky dashboard or use the following command:

goldsky subgraph list

Last updated