diff --git a/src/apolloClient.ts b/src/apolloClient.ts index 2de1d2d..92ad3b5 100644 --- a/src/apolloClient.ts +++ b/src/apolloClient.ts @@ -1,6 +1,11 @@ import { ApolloClient, InMemoryCache } from "@apollo/client"; +const isProduction = process.env.NODE_ENV === "production"; +const API_URL = isProduction + ? "https://fhdqwwo1yj.execute-api.us-east-1.amazonaws.com/" + : "http://localhost:3000"; + export const client = new ApolloClient({ - uri: "http://localhost:3000", + uri: API_URL, cache: new InMemoryCache(), });