Use Mirror to sync multiple subgraphs to one table.
Prepare a database
goldsky secret list
will show you the database secrets available on your active project.If you need to setup a secret, you can use goldsky secret create -h
. Here is an example.Select the subgraphs to combine
Create the pipeline definition
subgraphEntity
source. In this example we will use subgraphs on Optimism and on BSC:qidao-optimism
(QmPuXT3poo1T4rS6agZfT51ZZkiN3zQr6n5F2o1v9dRnnr
)qidao-bsc
(QmWgW69CaTwJYwcSdu36mkXgwWY11RjvX1oMGykrxT3wDS
)account
and event
entities from each.dailySnapshot
will be daily_snapshot
here.Create the pipeline
Monitor the pipeline
goldsky pipeline monitor qidao-crosschain
. The status should change from STARTING
to RUNNING
in a minute or so, and data will start appearing in your postgresql database.Create API server