ocean-subgraph/docker/bin/create

12 lines
287 B
Plaintext
Raw Permalink Normal View History

#! /bin/bash
if [ $# != 1 ]; then
echo "usage: create <name>"
exit 1
fi
api="http://index-node.default/"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_create", "params": {"name":"%s"}, "id":"1"}' "$1")
curl -s -H "content-type: application/json" --data "$data" "$api"