diff --git a/libs/cypress/src/lib/capsule/get-ethereum-config.ts b/libs/cypress/src/lib/capsule/get-ethereum-config.ts index 1de890e4b..250d59813 100644 --- a/libs/cypress/src/lib/capsule/get-ethereum-config.ts +++ b/libs/cypress/src/lib/capsule/get-ethereum-config.ts @@ -3,7 +3,7 @@ import { requestGQL } from './request'; export async function getEthereumConfig() { const query = gql` - { + query { networkParameter(key: "blockchains.ethereumConfig") { value } diff --git a/libs/cypress/src/lib/capsule/get-markets.ts b/libs/cypress/src/lib/capsule/get-markets.ts index 93d4a7c02..b49236d9b 100644 --- a/libs/cypress/src/lib/capsule/get-markets.ts +++ b/libs/cypress/src/lib/capsule/get-markets.ts @@ -3,7 +3,7 @@ import { requestGQL } from './request'; export async function getMarkets() { const query = gql` - { + query { marketsConnection { edges { node { diff --git a/libs/cypress/src/lib/capsule/get-party-stake.ts b/libs/cypress/src/lib/capsule/get-party-stake.ts index c4ce8c72c..746fbf8aa 100644 --- a/libs/cypress/src/lib/capsule/get-party-stake.ts +++ b/libs/cypress/src/lib/capsule/get-party-stake.ts @@ -3,7 +3,7 @@ import { requestGQL } from './request'; export async function getPartyStake(partyId: string) { const query = gql` - { + query { party(id:"${partyId}") { stakingSummary { currentStakeAvailable diff --git a/libs/cypress/src/lib/capsule/get-proposal.ts b/libs/cypress/src/lib/capsule/get-proposal.ts index 831b9c252..020dbce29 100644 --- a/libs/cypress/src/lib/capsule/get-proposal.ts +++ b/libs/cypress/src/lib/capsule/get-proposal.ts @@ -3,7 +3,7 @@ import { requestGQL } from './request'; export async function getProposal(id: string) { const query = gql` - { + query { proposal(id: "${id}") { id state diff --git a/libs/cypress/src/lib/capsule/get-vega-asset.ts b/libs/cypress/src/lib/capsule/get-vega-asset.ts index 8ca67efeb..79f14a839 100644 --- a/libs/cypress/src/lib/capsule/get-vega-asset.ts +++ b/libs/cypress/src/lib/capsule/get-vega-asset.ts @@ -3,7 +3,7 @@ import { requestGQL } from './request'; export async function getVegaAsset() { const query = gql` - { + query { assetsConnection { edges { node { diff --git a/scripts/get-queries.js b/scripts/get-queries.js index 17e2c56f1..0dfef8fad 100644 --- a/scripts/get-queries.js +++ b/scripts/get-queries.js @@ -9,9 +9,13 @@ const ignore = [ 'libs/fills/src/lib/fills-data-provider.ts', 'libs/orders/src/lib/components/order-data-provider/order-data-provider.ts', 'libs/trades/src/lib/trades-data-provider.ts', + // any queries in libs/cypress run against capsule + 'libs/cypress/**/*.ts', + 'libs/cypress/**/*.js', ]; const globPromise = util.promisify(glob); +const globOptions = { ignore }; const processTsFiles = (files) => { for (const file of files) { @@ -44,15 +48,11 @@ ${textContent} }; const run = async () => { - const files1 = await globPromise('apps/**/*.ts'); - const files2 = await globPromise('libs/**/*.ts'); - const files3 = await globPromise('apps/**/*.tsx'); - const files4 = await globPromise('lib/**/*.tsx'); - processTsFiles( - [...files1, ...files2, ...files3, ...files4].filter( - (f) => !ignore.includes(f) - ) - ); + const files1 = await globPromise('apps/**/*.ts', globOptions); + const files2 = await globPromise('libs/**/*.ts', globOptions); + const files3 = await globPromise('apps/**/*.tsx', globOptions); + const files4 = await globPromise('lib/**/*.tsx', globOptions); + processTsFiles([...files1, ...files2, ...files3, ...files4]); const gqlFiles1 = await globPromise('lib/**/*.graphql'); const gqlFiles2 = await globPromise('apps/**/*.graphql'); processGraphQlFiles([...gqlFiles1, ...gqlFiles2]);