From 7a5b48c25ce24d68e1a1317edf4ac5a12f006561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Sun, 1 Sep 2024 13:51:40 -0400 Subject: [PATCH] codegen subgraph -> add env var for graph-node/ipfs endpoints --- codegen/templates/subgraph/package.json.gotmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codegen/templates/subgraph/package.json.gotmpl b/codegen/templates/subgraph/package.json.gotmpl index d56ece86..7df3f1b9 100644 --- a/codegen/templates/subgraph/package.json.gotmpl +++ b/codegen/templates/subgraph/package.json.gotmpl @@ -5,12 +5,12 @@ "codegen": "graph codegen", "protogen": "buf generate --type=\"mydata.v1.MyData\" ../my-project-v0.1.0.spkg#format=bin; echo ''; echo '^^^ You can safely ignore warnings about \"non-conform Protobuf generation specification\": they come from the assemblyscript buf plugin'; echo ''", "build": "graph build", - "create-local": "graph create --node http://localhost:8020/ {{ .Name }}", - "remove-local": "graph remove --node http://localhost:8020/ {{ .Name }}", - "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 {{ .Name }} --version-label=v0.0.1", + "create-local": "graph create --node http://${LOCAL_GRAPH_NODE_HOSTNAME:-localhost}:8020/ {{ .Name }}", + "deploy-local": "graph deploy --node http://${LOCAL_GRAPH_NODE_HOSTNAME:-localhost}:8020/ --ipfs http://${LOCAL_IPFS_HOSTNAME:-localhost}:5001 {{ .Name }} --version-label=v0.0.1", "deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ {{ .Name }}", "publish": "graph publish", "test": "graph test" + "remove-local": "graph remove --node http://${LOCAL_GRAPH_NODE_HOSTNAME:-localhost}:8020/ {{ .Name }}", }, "dependencies": { "@graphprotocol/graph-cli": "^0.73.0",