Skip to content

Commit

Permalink
Do not throw error if API_URI is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-zeglen committed Jul 29, 2020
1 parent 4ffbcd0 commit 69336b8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions testUtils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ Polly.register(NodeHttpAdapter);
Polly.register(FSPersister);

function setupApi() {
if (!process.env.API_URI) {
throw new Error("Environment variable API_URI not set");
}

setupPolly({
adapters: ["node-http"],
matchRequestsBy: {
Expand All @@ -42,7 +38,7 @@ function setupApi() {
const link = new BatchHttpLink({
// @ts-ignore
fetch,
uri: process.env.API_URI
uri: process.env.API_URI || "http://localhost:8000/graphql/"
});
const apolloClient = new ApolloClient({
cache,
Expand Down

0 comments on commit 69336b8

Please sign in to comment.