diff --git a/graphql-connection-utils/graphql_schema.json b/graphql-connection-utils/graphql_schema.json index f212e25..4e08c6d 100644 --- a/graphql-connection-utils/graphql_schema.json +++ b/graphql-connection-utils/graphql_schema.json @@ -8994,7 +8994,7 @@ "deprecationReason": null, "description": null, "isDeprecated": false, - "name": "txEventParamList", + "name": "txEventParamListDeprecated", "type": { "kind": "NON_NULL", "name": null, @@ -9634,7 +9634,7 @@ { "defaultValue": null, "description": null, - "name": "txEventParamList", + "name": "txEventParamListDeprecated", "type": { "kind": "LIST", "name": null, @@ -9652,7 +9652,7 @@ { "defaultValue": null, "description": null, - "name": "txEventParamList_not", + "name": "txEventParamListDeprecated_not", "type": { "kind": "LIST", "name": null, @@ -9670,7 +9670,7 @@ { "defaultValue": null, "description": null, - "name": "txEventParamList_contains", + "name": "txEventParamListDeprecated_contains", "type": { "kind": "LIST", "name": null, @@ -9688,7 +9688,7 @@ { "defaultValue": null, "description": null, - "name": "txEventParamList_not_contains", + "name": "txEventParamListDeprecated_not_contains", "type": { "kind": "LIST", "name": null, @@ -9890,7 +9890,7 @@ "deprecationReason": null, "description": null, "isDeprecated": false, - "name": "txEventParamList" + "name": "txEventParamListDeprecated" }, { "deprecationReason": null, diff --git a/graphql-connection-utils/src/Test.bs.js b/graphql-connection-utils/src/Test.bs.js index 7e3a546..02f5c70 100644 --- a/graphql-connection-utils/src/Test.bs.js +++ b/graphql-connection-utils/src/Test.bs.js @@ -24,7 +24,7 @@ var query = (require("@apollo/client").gql` blockNumber contractVersion txEventList - txEventParamList + txEventParamListDeprecated patronChanges { id } @@ -40,7 +40,7 @@ function parse(value) { return { stateChanges: value$1.map(function (value) { var value$1 = value.txEventList; - var value$2 = value.txEventParamList; + var value$2 = value.txEventParamListDeprecated; var value$3 = value.patronChanges; var value$4 = value.wildcardChanges; return { @@ -51,7 +51,7 @@ function parse(value) { txEventList: value$1.map(function (value) { return value; }), - txEventParamList: value$2.map(function (value) { + txEventParamListDeprecated: value$2.map(function (value) { return value; }), patronChanges: value$3.map(function (value) { @@ -86,8 +86,8 @@ function serialize(value) { id: value$1 }; }); - var value$3 = value.txEventParamList; - var txEventParamList = value$3.map(function (value) { + var value$3 = value.txEventParamListDeprecated; + var txEventParamListDeprecated = value$3.map(function (value) { return value; }); var value$4 = value.txEventList; @@ -104,7 +104,7 @@ function serialize(value) { blockNumber: value$6, contractVersion: value$5, txEventList: txEventList, - txEventParamList: txEventParamList, + txEventParamListDeprecated: txEventParamListDeprecated, patronChanges: patronChanges, wildcardChanges: wildcardChanges }; diff --git a/graphql-connection-utils/src/Test.re b/graphql-connection-utils/src/Test.re index 5f6bff6..c69fcf7 100644 --- a/graphql-connection-utils/src/Test.re +++ b/graphql-connection-utils/src/Test.re @@ -17,7 +17,7 @@ module AllStateChanges = [%graphql blockNumber contractVersion txEventList - txEventParamList + txEventParamListDeprecated patronChanges { id } @@ -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\"]"); diff --git a/start_script.sh b/start_script.sh index 3eeff4c..8797a3d 100755 --- a/start_script.sh +++ b/start_script.sh @@ -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 @@ -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 } diff --git a/wildcards-subgraph b/wildcards-subgraph index 79a8e97..e83d980 160000 --- a/wildcards-subgraph +++ b/wildcards-subgraph @@ -1 +1 @@ -Subproject commit 79a8e973b023a09272bf8dfcc6b6a432676c6c62 +Subproject commit e83d9802176ca9be48ad0518a853b288b28c3d9d