Skip to content

Commit 4c41fce

Browse files
committed
fix: vercel api graphql
1 parent 362605b commit 4c41fce

File tree

1 file changed

+3
-1
lines changed
  • packages/app-explorer/src/systems/Core/utils

1 file changed

+3
-1
lines changed

packages/app-explorer/src/systems/Core/utils/sdk.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { resolve } from 'url';
12
import { getSdk } from '@fuel-explorer/graphql/src/sdk';
23
import { GraphQLClient } from 'graphql-request';
34

@@ -8,7 +9,8 @@ const VERCEL_ENV =
89

910
const getBaseUrl = () => {
1011
if (FUEL_EXPLORER_API && FUEL_EXPLORER_API_KEY) return FUEL_EXPLORER_API;
11-
if (VERCEL_ENV !== 'development') return `https://${VERCEL_URL}`;
12+
if (VERCEL_ENV !== 'development')
13+
return resolve(`https://${VERCEL_URL}`, '/api/graphql');
1214
return 'http://localhost:3000/api/graphql';
1315
};
1416
const getHeaders = () => {

0 commit comments

Comments
 (0)