diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 875d055e..5d302a31 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -35,6 +35,17 @@ const getConfig = (env: Environment): Config => { } export default defineNuxtConfig({ + vite: { + server: { + proxy: { + '/api': 'http://127.0.0.1:8000', + '/ws': { + target: 'ws://127.0.0.1:8000', + ws: true, + }, + }, + }, + }, srcDir: 'src/', components: [ '~/components', diff --git a/frontend/src/queries/useChartBlockMetrics.ts b/frontend/src/queries/useChartBlockMetrics.ts index 64e2c769..534704dd 100644 --- a/frontend/src/queries/useChartBlockMetrics.ts +++ b/frontend/src/queries/useChartBlockMetrics.ts @@ -21,13 +21,8 @@ const BlockMetricsQuery = gql` bucketWidth x_Time y_BlocksAdded - y_BlockTimeMin y_BlockTimeAvg - y_BlockTimeMax - y_LastTotalMicroCcd y_FinalizationTimeAvg - y_MinTotalMicroCcdStaked - y_MaxTotalMicroCcdStaked y_LastTotalMicroCcdStaked } } @@ -36,6 +31,7 @@ const BlockMetricsQuery = gql` export const useBlockMetricsQuery = (period: Ref) => { const { data, executeQuery, fetching } = useQuery({ + context: { url: '/api/graphql' }, query: BlockMetricsQuery, requestPolicy: 'cache-and-network', variables: { period },