fix installation graphql script
Some checks are pending
Crowdin Upload / upload-sources (push) Waiting to run
Test / lint (push) Waiting to run
Test / typecheck (push) Waiting to run
Test / deps-tests (push) Waiting to run
Test / unit-tests (push) Waiting to run
Test / build (push) Waiting to run
Test / cypress-typecheck (push) Waiting to run
Test / cypress-rerun (push) Waiting to run
Test / cypress-test-matrix (1) (push) Blocked by required conditions
Test / cypress-test-matrix (2) (push) Blocked by required conditions
Test / cypress-test-matrix (3) (push) Blocked by required conditions
Test / cypress-test-matrix (4) (push) Blocked by required conditions
Test / hardhat-cache (push) Blocked by required conditions
Test / cloud-typecheck (push) Waiting to run
Test / cloud-tests (push) Waiting to run
Test / pre (push) Waiting to run
Test / post (push) Blocked by required conditions
Some checks are pending
Crowdin Upload / upload-sources (push) Waiting to run
Test / lint (push) Waiting to run
Test / typecheck (push) Waiting to run
Test / deps-tests (push) Waiting to run
Test / unit-tests (push) Waiting to run
Test / build (push) Waiting to run
Test / cypress-typecheck (push) Waiting to run
Test / cypress-rerun (push) Waiting to run
Test / cypress-test-matrix (1) (push) Blocked by required conditions
Test / cypress-test-matrix (2) (push) Blocked by required conditions
Test / cypress-test-matrix (3) (push) Blocked by required conditions
Test / cypress-test-matrix (4) (push) Blocked by required conditions
Test / hardhat-cache (push) Blocked by required conditions
Test / cloud-typecheck (push) Waiting to run
Test / cloud-tests (push) Waiting to run
Test / pre (push) Waiting to run
Test / post (push) Blocked by required conditions
This commit is contained in:
parent
911af900ed
commit
1c131ee496
@ -9,19 +9,13 @@ const thegraphConfig = require('../graphql.thegraph.config')
|
|||||||
|
|
||||||
const exec = promisify(child_process.exec)
|
const exec = promisify(child_process.exec)
|
||||||
|
|
||||||
function fetchSchema(url, outputFile) {
|
async function fetchSchema(url, outputFile) {
|
||||||
exec(`yarn --silent get-graphql-schema --h Origin=https://app.uniswap.org ${url}`)
|
try {
|
||||||
.then(({ stderr, stdout }) => {
|
const { stdout } = await exec(`yarn --silent get-graphql-schema --h Origin=https://app.uniswap.org ${url}`);
|
||||||
if (stderr) {
|
await fs.writeFile(outputFile, stdout);
|
||||||
throw new Error(stderr)
|
} catch(err){
|
||||||
} else {
|
console.error(`Failed to fetch schema from ${url}`)
|
||||||
fs.writeFile(outputFile, stdout)
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err)
|
|
||||||
console.error(`Failed to fetch schema from ${url}`)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchSchema(process.env.THE_GRAPH_SCHEMA_ENDPOINT, thegraphConfig.schema)
|
fetchSchema(process.env.THE_GRAPH_SCHEMA_ENDPOINT, thegraphConfig.schema)
|
||||||
|
Loading…
Reference in New Issue
Block a user