Skip to content

Commit

Permalink
Update to work with new eventParam
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Smythe <[email protected]>
  • Loading branch information
marvinkruse and JasoonS committed Sep 10, 2020
1 parent 4e34a41 commit 6249bce
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 36 deletions.
12 changes: 6 additions & 6 deletions graphql-connection-utils/graphql_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8994,7 +8994,7 @@
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "txEventParamList",
"name": "txEventParamListDeprecated",
"type": {
"kind": "NON_NULL",
"name": null,
Expand Down Expand Up @@ -9634,7 +9634,7 @@
{
"defaultValue": null,
"description": null,
"name": "txEventParamList",
"name": "txEventParamListDeprecated",
"type": {
"kind": "LIST",
"name": null,
Expand All @@ -9652,7 +9652,7 @@
{
"defaultValue": null,
"description": null,
"name": "txEventParamList_not",
"name": "txEventParamListDeprecated_not",
"type": {
"kind": "LIST",
"name": null,
Expand All @@ -9670,7 +9670,7 @@
{
"defaultValue": null,
"description": null,
"name": "txEventParamList_contains",
"name": "txEventParamListDeprecated_contains",
"type": {
"kind": "LIST",
"name": null,
Expand All @@ -9688,7 +9688,7 @@
{
"defaultValue": null,
"description": null,
"name": "txEventParamList_not_contains",
"name": "txEventParamListDeprecated_not_contains",
"type": {
"kind": "LIST",
"name": null,
Expand Down Expand Up @@ -9890,7 +9890,7 @@
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "txEventParamList"
"name": "txEventParamListDeprecated"
},
{
"deprecationReason": null,
Expand Down
12 changes: 6 additions & 6 deletions graphql-connection-utils/src/Test.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions graphql-connection-utils/src/Test.re
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module AllStateChanges = [%graphql
blockNumber
contractVersion
txEventList
txEventParamList
txEventParamListDeprecated
patronChanges {
id
}
Expand Down Expand Up @@ -175,7 +175,7 @@ describe("Graph Test", done_ => {
Js.log2("event", event);
let argumentsJson =
Js.Json.parseExn(
stateChange.txEventParamList[index]
stateChange.txEventParamListDeprecated[index]
->Option.getWithDefault("THIS SHOULD NEVER HAPPEN"),
);
// let argumentsJson = Js.Json.parseExn("[\"Hello\"]");
Expand Down
66 changes: 45 additions & 21 deletions start_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,42 @@ function killAndExit {
exit 0
}

function graphCreate {
echo '####### DEPLOYING GRAPH #######'
cd wildcards-subgraph && yarn codegen && yarn build && yarn create-local && yarn deploy-local
if [ "$?" -ne 0 ];
then
echo "ERROR: Could not deploy graph successfully"
killAndExit
fi
cd ..
}

function graphRedeploy {
echo '####### REDEPLOYING GRAPH #######'
cd wildcards-subgraph && yarn codegen && yarn build && yarn deploy-local
if [ "$?" -ne 0 ];
then
echo "ERROR: Could not redeploy graph successfully"
# killAndExit
fi
cd ..
}

function doneLoop {
echo "######################"
echo "######## DONE ########"
if [ $WAIT_FOR_INPUT = true ]; then
echo "####### PRESS R to RESTART ######"
echo "# PRESS G to REDEPLOY the graph #"
echo "######## PRESS Q to QUIT ########"
fi
echo "######################"
if [ $WAIT_FOR_INPUT = true ]; then
waitForInput
fi
}

function start {
echo "####### CLEANUP #######"
rm -rf data ganache-data
Expand Down Expand Up @@ -49,40 +85,28 @@ function start {
echo "ERROR: Could not deploy contracts successfully"
killAndExit
fi

echo '####### DEPLOYING GRAPH #######'
cd ../wildcards-subgraph && yarn codegen && yarn build && yarn create-local && yarn deploy-local
cd ..

if [ "$?" -ne 0 ];
then
echo "ERROR: Could not deploy graph successfully"
killAndExit
fi


echo "######################"
echo "######## DONE ########"
if [ $WAIT_FOR_INPUT = true ]; then
echo "# PRESS R to RESTART #"
echo "### PRESS Q to QUIT ##"
fi
echo "######################"
if [ $WAIT_FOR_INPUT = true ]; then
waitForInput
fi
graphCreate
doneLoop
}

function waitForInput {
while [ true ] ; do
read -n 1 k <&1
if [[ $k == "q" || $k == "Q" ]]; then
echo ""
killAndExit
elif [[ $k == "r" || $k == "R" ]]; then
echo "######## RESTARTING ########"
echo ""
echo "######## RESTARTING ALL ########"
killCompose
sleep 3
start
elif [[ $k == "g" || $k == "G" ]]; then
echo ""
graphRedeploy
doneLoop
fi
done
}
Expand Down

0 comments on commit 6249bce

Please sign in to comment.