Skip to content

edgeandnode/amp-subgraph-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amp-powered subgraphs

This repository contains Amp-powered subgraph examples.

Deployment

The Amp-powered subgraphs feature will soon be integrated into the Graph CLI. This is a temporary method for deploying an Amp-powered subgraph to a local graph-node instance for testing:

  1. Upload the subgraph to IPFS:
IPFS_URL=http://127.0.0.1:5001 ./upload.sh 1_schema_generation
  1. Get the subgraph CID from the output:
Uploaded BlockValue.sql -> QmV72XBeZtTJbWKJspVA7DSV2PD3CqtDwjgm7574tC3ToG
Uploaded subgraph.generated.yaml -> QmahhFmAhDwyKRsCxTo8TpZyyCCc5R2QoyLWo44EsBE5tL
Uploaded subgraph.template.yaml -> QmPvmFdMubqr3vj7VrK6sAVmmQmihjk7D8GbR43yDxJxPX
Subgraph Hash: QmahhFmAhDwyKRsCxTo8TpZyyCCc5R2QoyLWo44EsBE5tL
               ^ COPY the last CID
  1. Deploy the subgraph using graphman:
graphman deploy --create first_amp_subgraph QmahhFmAhDwyKRsCxTo8TpZyyCCc5R2QoyLWo44EsBE5tL

GraphQL queries

After deploying an Amp-powered subgraph to a local graph-node instance, it is possible to query it at the following address:

http://localhost:8000/subgraphs/name/first_amp_subgraph/graphql
                                     ^ replace with the deployed subgraph name

Note

The GraphQL web interface contains all the schemas and all the available queries for the subgraph.

About

This repository contains Amp-powered subgraph examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published