Skip to content

Commit

Permalink
Update API url
Browse files Browse the repository at this point in the history
  • Loading branch information
devennavani committed Jan 18, 2024
1 parent 75b254d commit d278dd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/graphql/apolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const getApiUrl = () => {
// Should only be present when running UI locally
if (process.env.NEXT_PUBLIC_MODAL_ENVIRONMENT) {
// This assumes you are running your API via `model serve` in the MODAL_ENVIRONMENT environment
return `https://devennavani-${process.env.NEXT_PUBLIC_MODAL_ENVIRONMENT}--api-fastapi-app-dev.modal.run/graphql`;
return `https://devennavani-${process.env.NEXT_PUBLIC_MODAL_ENVIRONMENT}--modalproject-fastapi-app-dev.modal.run/graphql`;
} else {
const VERCEL_GIT_PULL_REQUEST_ID = process.env.NEXT_PUBLIC_VERCEL_GIT_PULL_REQUEST_ID;
const MODAL_ENVIRONMENT_NAME = VERCEL_GIT_PULL_REQUEST_ID ? `pr${VERCEL_GIT_PULL_REQUEST_ID}` : 'dev';
return `https://devennavani-${MODAL_ENVIRONMENT_NAME}--api-fastapi-app.modal.run/graphql`;
return `https://devennavani-${MODAL_ENVIRONMENT_NAME}--modalproject-fastapi-app.modal.run/graphql`;
}
}
const url = getApiUrl();
Expand Down

0 comments on commit d278dd7

Please sign in to comment.