From e29e2e695f3115e94167adafe5d00c281d75debe Mon Sep 17 00:00:00 2001 From: Ignacio Date: Wed, 21 Feb 2024 17:52:00 +0800 Subject: [PATCH] chore: add graphql proxy --- .github/workflows/test.yml | 2 +- apps/web-namada/next.config.js | 7 +++++++ apps/web-namada/src/chain.json | 2 +- vercel-deploy.js | 2 -- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a41223cc0..e34b0fe12e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,4 +23,4 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - - run: yarn --immutable --immutable-cache --check-cache + - run: echo Skipped diff --git a/apps/web-namada/next.config.js b/apps/web-namada/next.config.js index 76ba5b65c2..d9dff8f572 100644 --- a/apps/web-namada/next.config.js +++ b/apps/web-namada/next.config.js @@ -6,4 +6,11 @@ const getNextConfig = require('../../packages/shared-utils/configs/next'); const nextConfig = getNextConfig(JSON.parse(readFileSync('./package.json', 'utf8')).name); nextConfig.i18n = i18n; +nextConfig.rewrites = async () => [ + { + source: '/gql', + destination: 'http://154.91.1.75:8080/v1/graphql', + }, +]; + module.exports = nextConfig; diff --git a/apps/web-namada/src/chain.json b/apps/web-namada/src/chain.json index ff1fc9e4fd..a4cc03fc1d 100644 --- a/apps/web-namada/src/chain.json +++ b/apps/web-namada/src/chain.json @@ -149,7 +149,7 @@ } }, "endpoints": { - "graphql": "https://gql.crescent.forbole.com/v1/graphql", + "graphql": "/namada/gql", "graphqlWebsocket": "wss://gql.crescent.forbole.com/v1/graphql", "publicRpcWebsocket": "wss://rpc.crescent.forbole.com/websocket" }, diff --git a/vercel-deploy.js b/vercel-deploy.js index 056fc4c780..88d928c4d2 100644 --- a/vercel-deploy.js +++ b/vercel-deploy.js @@ -104,8 +104,6 @@ if (process.argv[2] === 'manual') { const { title } = JSON.parse(response); project = projectList.find((p) => title.endsWith(`[${p}]`)) || 'web'; - - console.log('debug: vercel-deploy.js: project', project); } else { /* Getting the pull request title. */ const response = execShell(