NOTE: Set your network to devnet in your subgraph.yaml file manually. It will not be listed in the graph init command because mevm is not yet supported by thegraph.
Your subgraph.yaml should look something like this:
Note: Replace the <PROJECT>/<NAME> accordingly. Example lync/nfts
You can use this endpoint to query your subgraph data using graphql.
Troubleshooting
If while deploying the subgraph you face any errors like:
xgraphcreate--node<https://api.mevm-devnet.lync.world/deploy>lync/nfts›Warning:Innextmajorversion,thiscommandwillbemergedasasubcommandfor`graphlocal`.✖HTTPerrorcreatingthesubgraph:480/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21
thrownewexit_2.ExitError(code);^ExitError:EEXIT:1 at Object.exit (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21:11)
at CreateCommand.exit (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/command.js:131:23)
at/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/dist/commands/create.js:50:22 at Client._parseResponse (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:190:12)
at /home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:149:10
at IncomingMessage.<anonymous> (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/http.js:80:11)
atIncomingMessage.emit (node:events:531:35)atendReadableNT (node:internal/streams/readable:1696:12)atprocess.processTicksAndRejections (node:internal/process/task_queues:82:21) {oclif:{exit:1},code:'EEXIT'}Node.jsv20.14.0
Here, take a look at the error code. 480 in the output above.