From 940c2bd8f598ac2e74bdf3124a73394ddf1982cc Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 8 Mar 2023 10:35:04 +1300 Subject: [PATCH 1/7] update action version (#149) --- .github/workflows/aws-prod.yml | 4 ++-- .github/workflows/aws-staging.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aws-prod.yml b/.github/workflows/aws-prod.yml index 0a9a105..48a7d90 100644 --- a/.github/workflows/aws-prod.yml +++ b/.github/workflows/aws-prod.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v1-node16 with: aws-access-key-id: ${{ secrets.POLLINGDB2_PROD_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.POLLINGDB2_PROD_AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/aws-staging.yml b/.github/workflows/aws-staging.yml index dc6fd8b..96990d3 100644 --- a/.github/workflows/aws-staging.yml +++ b/.github/workflows/aws-staging.yml @@ -21,10 +21,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v1-node16 with: aws-access-key-id: ${{ secrets.POLLINGDB2_STAGING_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.POLLINGDB2_STAGING_AWS_SECRET_ACCESS_KEY }} From 18dead229a1763cc8fefc2076f796812b148bb22 Mon Sep 17 00:00:00 2001 From: tyler17 Date: Wed, 6 Sep 2023 20:56:55 -0700 Subject: [PATCH 2/7] try adding script to insert authorized creators --- insert_poll_creators.js | 30 +++++++++++ migrations/072-poll-creators.sql | 9 ++++ package.json | 9 ++-- yarn.lock | 90 +++++++++++--------------------- 4 files changed, 74 insertions(+), 64 deletions(-) create mode 100644 insert_poll_creators.js create mode 100644 migrations/072-poll-creators.sql diff --git a/insert_poll_creators.js b/insert_poll_creators.js new file mode 100644 index 0000000..9ccb4c3 --- /dev/null +++ b/insert_poll_creators.js @@ -0,0 +1,30 @@ +require('dotenv').config(); + +const pgp = require('pg-promise')(); +const authorizedCreatorsArray = (process.env.AUTHORIZED_CREATORS || '').split(',').map(creator => creator.toLowerCase()); + +const cn = { + host: process.env.VL_DB_HOST, + port: process.env.VL_DB_PORT, + database: process.env.VL_DB_DATABASE, + user: process.env.VL_DB_USER, + password: process.env.VL_DB_PASSWORD +}; + +const db = pgp(cn); + +const deleteQuery = 'DELETE FROM polling.creators'; +const insertQuery = 'INSERT INTO polling.creators (address) VALUES ($1)'; + +function executeQueries(connection) { + return connection.none(deleteQuery) + .then(() => connection.tx(t => t.batch(authorizedCreatorsArray.map(creator => connection.none(insertQuery, creator))))) + .catch(err => console.error('Error message: ', err.message, 'Stack trace: ', err.stack)); +} + +db.connect() + .then(connection => { + executeQueries(connection) + .finally(() => connection.done()); + }) + .catch(err => console.error('Error message: ', err.message, 'Stack trace: ', err.stack)); \ No newline at end of file diff --git a/migrations/072-poll-creators.sql b/migrations/072-poll-creators.sql new file mode 100644 index 0000000..d29f4c1 --- /dev/null +++ b/migrations/072-poll-creators.sql @@ -0,0 +1,9 @@ +create table polling.creators ( + address character varying(66) not null +); + +create or replace function api.polling_creators() +returns setof polling.creators as $$ + select * + from polling.creators; +$$ language sql stable strict; diff --git a/package.json b/package.json index d85356a..79645cc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "start-api": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-graphql-api/dist/index.js ./config.js", "test": "jest", "test:ci": "./tests/run-tests.sh", - "repl": "node --experimental-repl-await -r ./loadenv.js ./repl" + "repl": "node --experimental-repl-await -r ./loadenv.js ./repl", + "insert-poll-creators": "node insert_poll_creators.js" }, "dependencies": { "@makerdao-dux/spock-etl": "^0.2.0", @@ -20,13 +21,13 @@ "bignumber.js": "^9.0.2", "consola": "^2.15.3", "dotenv-flow": "^2.0.0", - "ethers": "krzkaczor/ethers.js#kk/get-logs-multiple-address-build" + "ethers": "krzkaczor/ethers.js#kk/get-logs-multiple-address-build", + "pg-promise": "10.4.4" }, "devDependencies": { "eslint": "^8.23.1", "eslint-plugin-prettier": "^4.2.1", "graphql-request": "^1.8.2", - "jest": "^24.8.0", - "pg-promise": "^8.7.2" + "jest": "^24.8.0" } } diff --git a/yarn.lock b/yarn.lock index 0b1b574..bdd4595 100644 --- a/yarn.lock +++ b/yarn.lock @@ -938,10 +938,10 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -assert-options@0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/assert-options/-/assert-options-0.1.3.tgz#ea56c6a67a558eefb9db52c394f2fa92b94bfcde" - integrity sha512-DXrZ5WkCv/igD+H8OmeUTl9k0pBhYSTdyA7DRZoSJERCzQ8Z2v85yDjkhYVnHUOeCXGfCNKaogRbLWQsIQbtpg== +assert-options@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/assert-options/-/assert-options-0.6.1.tgz#b3bca8bc6eb23cd8acdec458134be78f3e4dbb64" + integrity sha512-jH2pNULN0t3uFLb7Fh0SAuMo/Ei5yWiRirvLez2g+sd16d0xKl+DGdGkD6sqkrZTnCZK5lWRjUa4X3sxHQkg9g== assert-options@0.7.0: version "0.7.0" @@ -3704,11 +3704,6 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -manakin@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/manakin/-/manakin-0.5.2.tgz#abe3df430ca6085f6983f6e4cf5af0298f4d30cc" - integrity sha512-pfDSB7QYoVg0Io4KMV9hhPoXpj6p0uBscgtyUSKCOFZe8bqgbpStfgnKIbF/ulnr6U3ICu4OqdyxAqBgOhZwBQ== - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -4232,10 +4227,10 @@ pg-int8@1.0.1: resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-minify@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/pg-minify/-/pg-minify-1.4.1.tgz#ff9a9febefa6cec53055e2fd24e3115a275e2a08" - integrity sha512-8aZ9xdx7Pe/ppFYVOqvU5KgmM6ttXjaBlsl9Y8yzrUH4xSNVucJKKOwm4Y4H+LCvzZGjZIm4Rkf2Ajt5ixtkBQ== +pg-minify@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/pg-minify/-/pg-minify-1.5.2.tgz#5e2217db499cb3bf29338dc90d8f8cc29b72504f" + integrity sha512-uZn/gXkGmO5JBdopxNLSpFMS1lXr+KJqynI8Di1Qyr8ZVXt67ruh+XNfzLMVdLzYv+MQRdNYQdVwWPSs0qM7xQ== pg-minify@1.6.2: version "1.6.2" @@ -4247,7 +4242,7 @@ pg-packet-stream@^1.1.0: resolved "https://registry.yarnpkg.com/pg-packet-stream/-/pg-packet-stream-1.1.0.tgz#e45c3ae678b901a2873af1e17b92d787962ef914" integrity sha512-kRBH0tDIW/8lfnnOyTwKD23ygJ/kexQVXZs7gEyBljw4FYqimZFxnMMx50ndZ8In77QgfGuItS5LLclC2TtjYg== -pg-pool@^2.0.10, pg-pool@^2.0.4: +pg-pool@^2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.10.tgz#842ee23b04e86824ce9d786430f8365082d81c4a" integrity sha512-qdwzY92bHf3nwzIUcj+zJ0Qo5lpG/YxchahxIN8+ZVmXqkahKXsnl2aiJPHLYN9o5mB/leG+Xh6XKxtP7e0sjg== @@ -4257,6 +4252,16 @@ pg-pool@^3.4.1, pg-pool@^3.5.1: resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.5.1.tgz#f499ce76f9bf5097488b3b83b19861f28e4ed905" integrity sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ== +pg-promise@10.4.4: + version "10.4.4" + resolved "https://registry.yarnpkg.com/pg-promise/-/pg-promise-10.4.4.tgz#f5f2432adb3a5f0c3babc89df1cb8a55a475ce32" + integrity sha512-N2NsOgKxrnNPwP0Q609ZmxmAZEo2TQ26SzSvlbZWQb8vteqUhOPpU/pHi9DGatJrPcXNoyr4xjRw42CNfEBg/w== + dependencies: + assert-options "0.6.1" + pg "7.18.2" + pg-minify "1.5.2" + spex "3.0.1" + pg-promise@^10.4.4: version "10.11.1" resolved "https://registry.yarnpkg.com/pg-promise/-/pg-promise-10.11.1.tgz#62348927da636aa74d2c20510cfbd12e85f104ae" @@ -4267,17 +4272,6 @@ pg-promise@^10.4.4: pg-minify "1.6.2" spex "3.2.0" -pg-promise@^8.7.2: - version "8.7.5" - resolved "https://registry.yarnpkg.com/pg-promise/-/pg-promise-8.7.5.tgz#d66beb86b041ae6e9dc66c4b5c7fb04dafcd18bb" - integrity sha512-r/OmS1b1i0nA0KHqlbcAoMLoNo3EGUdcZxaseyXnHrzepcS8ciK516Lw6/lIb6AeWI85ZOBSNdiPlw22xoFx3A== - dependencies: - assert-options "0.1.3" - manakin "0.5.2" - pg "7.11.0" - pg-minify "1.4.1" - spex "2.2.0" - pg-protocol@*, pg-protocol@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.5.0.tgz#b5dd452257314565e2d54ab3c132adc46565a6a0" @@ -4304,27 +4298,17 @@ pg-types@^2.1.0, pg-types@^2.2.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg-types@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.0.1.tgz#b8585a37f2a9c7b386747e44574799549e5f4933" - integrity sha512-b7y6QM1VF5nOeX9ukMQ0h8a9z89mojrBHXfJeSug4mhL0YpxNBm83ot2TROyoAmX/ZOX3UbwVO4EbH7i1ZZNiw== - dependencies: - pg-int8 "1.0.1" - postgres-array "~2.0.0" - postgres-bytea "~1.0.0" - postgres-date "~1.0.4" - postgres-interval "^1.1.0" - -pg@7.11.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/pg/-/pg-7.11.0.tgz#a8b9ae9cf19199b7952b72957573d0a9c5e67c0c" - integrity sha512-YO4V7vCmEMGoF390LJaFaohWNKaA2ayoQOEZmiHVcAUF+YsRThpf/TaKCgSvsSE7cDm37Q/Cy3Gz41xiX/XjTw== +pg@7.18.2, pg@^7.9.0: + version "7.18.2" + resolved "https://registry.yarnpkg.com/pg/-/pg-7.18.2.tgz#4e219f05a00aff4db6aab1ba02f28ffa4513b0bb" + integrity sha512-Mvt0dGYMwvEADNKy5PMQGlzPudKcKKzJds/VbOeZJpb6f/pI3mmoXX0JksPgI3l3JPP/2Apq7F36O63J7mgveA== dependencies: buffer-writer "2.0.0" packet-reader "1.0.0" pg-connection-string "0.1.3" - pg-pool "^2.0.4" - pg-types "~2.0.0" + pg-packet-stream "^1.1.0" + pg-pool "^2.0.10" + pg-types "^2.1.0" pgpass "1.x" semver "4.3.2" @@ -4354,20 +4338,6 @@ pg@8.7.1: pg-types "^2.1.0" pgpass "1.x" -pg@^7.9.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/pg/-/pg-7.18.2.tgz#4e219f05a00aff4db6aab1ba02f28ffa4513b0bb" - integrity sha512-Mvt0dGYMwvEADNKy5PMQGlzPudKcKKzJds/VbOeZJpb6f/pI3mmoXX0JksPgI3l3JPP/2Apq7F36O63J7mgveA== - dependencies: - buffer-writer "2.0.0" - packet-reader "1.0.0" - pg-connection-string "0.1.3" - pg-packet-stream "^1.1.0" - pg-pool "^2.0.10" - pg-types "^2.1.0" - pgpass "1.x" - semver "4.3.2" - pgpass@1.x: version "1.0.5" resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.5.tgz#9b873e4a564bb10fa7a7dbd55312728d422a223d" @@ -5120,10 +5090,10 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== -spex@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spex/-/spex-2.2.0.tgz#b0d825f43ca3c88a35bda79553296c83c07b4d63" - integrity sha512-iwBxqKe4ZKD+P/i/WdzWw5qxmerHvzVb29wQm4zwYaDPuwsTKjS7nbqt8OyBSLAi2q0ZFUN3F2b4erX0UwF0fA== +spex@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spex/-/spex-3.0.1.tgz#af366312611f8777e754ecb5393cccd1d251f869" + integrity sha512-priWZUrXBmVPHTOmtUeS7gZzCOUwRK87OHJw5K8bTC6MLOq93mQocx+vWccNyKPT2EY+goZvKGguGn2lx8TBDA== spex@3.2.0: version "3.2.0" From c7b65fa47190bcb5684191b09c674e183849b337 Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 7 Sep 2023 15:15:42 -0700 Subject: [PATCH 3/7] fix script --- insert_poll_creators.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/insert_poll_creators.js b/insert_poll_creators.js index 9ccb4c3..4398171 100644 --- a/insert_poll_creators.js +++ b/insert_poll_creators.js @@ -1,30 +1,34 @@ require('dotenv').config(); const pgp = require('pg-promise')(); -const authorizedCreatorsArray = (process.env.AUTHORIZED_CREATORS || '').split(',').map(creator => creator.toLowerCase()); -const cn = { +const db = pgp({ host: process.env.VL_DB_HOST, port: process.env.VL_DB_PORT, database: process.env.VL_DB_DATABASE, user: process.env.VL_DB_USER, password: process.env.VL_DB_PASSWORD -}; +}); -const db = pgp(cn); +const authorizedCreatorsArray = (process.env.AUTHORIZED_CREATORS || '').split(',').map(creator => creator.toLowerCase()); const deleteQuery = 'DELETE FROM polling.creators'; const insertQuery = 'INSERT INTO polling.creators (address) VALUES ($1)'; -function executeQueries(connection) { - return connection.none(deleteQuery) - .then(() => connection.tx(t => t.batch(authorizedCreatorsArray.map(creator => connection.none(insertQuery, creator))))) - .catch(err => console.error('Error message: ', err.message, 'Stack trace: ', err.stack)); +async function executeQueries() { + try { + await db.none(deleteQuery); + console.log('All previous creators deleted.'); + + for (const creator of authorizedCreatorsArray) { + await db.none(insertQuery, creator); + console.log(`Creator ${creator} added successfully.`); + } + + console.log('All authorized creators added successfully.'); + } catch (err) { + console.error('Error: ', err); + } } -db.connect() - .then(connection => { - executeQueries(connection) - .finally(() => connection.done()); - }) - .catch(err => console.error('Error message: ', err.message, 'Stack trace: ', err.stack)); \ No newline at end of file +executeQueries().catch(err => console.error('Error: ', err)); \ No newline at end of file From 40d12b39d87148d6fa693795ffe41af2f46d405d Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 7 Sep 2023 15:19:08 -0700 Subject: [PATCH 4/7] update migrate command --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 79645cc..e1b3bf9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "scripts": { "start-etl": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-etl/dist/bin/etl ./config.js", "start-sync": "yarn migrate", - "migrate": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-etl/dist/bin/migrate ./config.js", + "migrate:only": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-etl/dist/bin/migrate ./config.js", + "migrate": "yarn migrate:only && yarn insert-poll-creators", "start-api": "node -r ./loadenv.js ./node_modules/@makerdao-dux/spock-graphql-api/dist/index.js ./config.js", "test": "jest", "test:ci": "./tests/run-tests.sh", From 5fd813abdc7e7990374bc649dcbf60d8793764cb Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 7 Sep 2023 15:41:10 -0700 Subject: [PATCH 5/7] fix query --- migrations/072-poll-creators.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/072-poll-creators.sql b/migrations/072-poll-creators.sql index d29f4c1..e226f99 100644 --- a/migrations/072-poll-creators.sql +++ b/migrations/072-poll-creators.sql @@ -2,7 +2,7 @@ create table polling.creators ( address character varying(66) not null ); -create or replace function api.polling_creators() +create or replace function api.poll_creators() returns setof polling.creators as $$ select * from polling.creators; From 8cc9d975059ef718cd9ce6b181c794d338bdc524 Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 7 Sep 2023 19:48:33 -0700 Subject: [PATCH 6/7] use same pg-promise version as spock --- package.json | 2 +- yarn.lock | 55 ++++++++++++++-------------------------------------- 2 files changed, 16 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index e1b3bf9..2d9b7b3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "consola": "^2.15.3", "dotenv-flow": "^2.0.0", "ethers": "krzkaczor/ethers.js#kk/get-logs-multiple-address-build", - "pg-promise": "10.4.4" + "pg-promise": "10.11.1" }, "devDependencies": { "eslint": "^8.23.1", diff --git a/yarn.lock b/yarn.lock index bdd4595..61e5d70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -938,11 +938,6 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -assert-options@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/assert-options/-/assert-options-0.6.1.tgz#b3bca8bc6eb23cd8acdec458134be78f3e4dbb64" - integrity sha512-jH2pNULN0t3uFLb7Fh0SAuMo/Ei5yWiRirvLez2g+sd16d0xKl+DGdGkD6sqkrZTnCZK5lWRjUa4X3sxHQkg9g== - assert-options@0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/assert-options/-/assert-options-0.7.0.tgz#82c27618d9c0baa5e9da8ef607ee261a44ed6e5e" @@ -4227,11 +4222,6 @@ pg-int8@1.0.1: resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-minify@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/pg-minify/-/pg-minify-1.5.2.tgz#5e2217db499cb3bf29338dc90d8f8cc29b72504f" - integrity sha512-uZn/gXkGmO5JBdopxNLSpFMS1lXr+KJqynI8Di1Qyr8ZVXt67ruh+XNfzLMVdLzYv+MQRdNYQdVwWPSs0qM7xQ== - pg-minify@1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/pg-minify/-/pg-minify-1.6.2.tgz#055acfe862cfca3ca0a529020846b0f308d68e70" @@ -4252,17 +4242,7 @@ pg-pool@^3.4.1, pg-pool@^3.5.1: resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.5.1.tgz#f499ce76f9bf5097488b3b83b19861f28e4ed905" integrity sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ== -pg-promise@10.4.4: - version "10.4.4" - resolved "https://registry.yarnpkg.com/pg-promise/-/pg-promise-10.4.4.tgz#f5f2432adb3a5f0c3babc89df1cb8a55a475ce32" - integrity sha512-N2NsOgKxrnNPwP0Q609ZmxmAZEo2TQ26SzSvlbZWQb8vteqUhOPpU/pHi9DGatJrPcXNoyr4xjRw42CNfEBg/w== - dependencies: - assert-options "0.6.1" - pg "7.18.2" - pg-minify "1.5.2" - spex "3.0.1" - -pg-promise@^10.4.4: +pg-promise@10.11.1, pg-promise@^10.4.4: version "10.11.1" resolved "https://registry.yarnpkg.com/pg-promise/-/pg-promise-10.11.1.tgz#62348927da636aa74d2c20510cfbd12e85f104ae" integrity sha512-HAv32WSKf2m2RqHerW5RmANn/mcXIwWXbg/gOfGQcoS0SE+8iBi3Jj4JmoR4PNzSEozo/y/npy4e6F16psOItw== @@ -4298,20 +4278,6 @@ pg-types@^2.1.0, pg-types@^2.2.0: postgres-date "~1.0.4" postgres-interval "^1.1.0" -pg@7.18.2, pg@^7.9.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/pg/-/pg-7.18.2.tgz#4e219f05a00aff4db6aab1ba02f28ffa4513b0bb" - integrity sha512-Mvt0dGYMwvEADNKy5PMQGlzPudKcKKzJds/VbOeZJpb6f/pI3mmoXX0JksPgI3l3JPP/2Apq7F36O63J7mgveA== - dependencies: - buffer-writer "2.0.0" - packet-reader "1.0.0" - pg-connection-string "0.1.3" - pg-packet-stream "^1.1.0" - pg-pool "^2.0.10" - pg-types "^2.1.0" - pgpass "1.x" - semver "4.3.2" - pg@8.7.1: version "8.7.1" resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.1.tgz#9ea9d1ec225980c36f94e181d009ab9f4ce4c471" @@ -4338,6 +4304,20 @@ pg@8.7.1: pg-types "^2.1.0" pgpass "1.x" +pg@^7.9.0: + version "7.18.2" + resolved "https://registry.yarnpkg.com/pg/-/pg-7.18.2.tgz#4e219f05a00aff4db6aab1ba02f28ffa4513b0bb" + integrity sha512-Mvt0dGYMwvEADNKy5PMQGlzPudKcKKzJds/VbOeZJpb6f/pI3mmoXX0JksPgI3l3JPP/2Apq7F36O63J7mgveA== + dependencies: + buffer-writer "2.0.0" + packet-reader "1.0.0" + pg-connection-string "0.1.3" + pg-packet-stream "^1.1.0" + pg-pool "^2.0.10" + pg-types "^2.1.0" + pgpass "1.x" + semver "4.3.2" + pgpass@1.x: version "1.0.5" resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.5.tgz#9b873e4a564bb10fa7a7dbd55312728d422a223d" @@ -5090,11 +5070,6 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== -spex@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spex/-/spex-3.0.1.tgz#af366312611f8777e754ecb5393cccd1d251f869" - integrity sha512-priWZUrXBmVPHTOmtUeS7gZzCOUwRK87OHJw5K8bTC6MLOq93mQocx+vWccNyKPT2EY+goZvKGguGn2lx8TBDA== - spex@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/spex/-/spex-3.2.0.tgz#fa4a21922407e112624977b445a6d634578a1127" From dadefb8135aa475516a5cb43fa363a5b18ae39d8 Mon Sep 17 00:00:00 2001 From: tyler17 Date: Thu, 7 Sep 2023 19:50:44 -0700 Subject: [PATCH 7/7] add query file --- queries/pollCreators.graphql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 queries/pollCreators.graphql diff --git a/queries/pollCreators.graphql b/queries/pollCreators.graphql new file mode 100644 index 0000000..66b719f --- /dev/null +++ b/queries/pollCreators.graphql @@ -0,0 +1,7 @@ +query pollCreators { + pollCreators { + nodes { + address + } + } +} \ No newline at end of file