-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
44 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -xo errexit | ||
|
||
npx graph-compiler \ | ||
--config ${CONFIG:-configs/sample.json} \ | ||
--include src/datasources \ | ||
--export-subgraph \ | ||
--export-schema && | ||
# Default is to deploy all live configs | ||
configs=$1 | ||
: ${configs:=configs/live/**/*.json} | ||
|
||
npx graph codegen \ | ||
${SUBGRAPH:-generated/sample.subgraph.yaml} && | ||
for config in $configs; | ||
do | ||
subgraph=$(jq -r '.output' $config) | ||
npx graph-compiler --config ${config} --include src/datasources --export-schema --export-subgraph | ||
npx graph codegen ${subgraph}subgraph.yaml | ||
|
||
npx graph build \ | ||
${SUBGRAPH:-generated/sample.subgraph.yaml} && | ||
|
||
npx graph deploy \ | ||
--product hosted-service \ | ||
${NAME:-amxx/sandbox} \ | ||
${SUBGRAPH:-generated/sample.subgraph.yaml} && | ||
|
||
echo 'done.' | ||
jq -cr '.deploy[].type+" "+.deploy[].name' $config | while read endpoint; | ||
do | ||
npx graph deploy --product ${endpoint} ${subgraph}subgraph.yaml | ||
done | ||
done |