Add isTest to settings and ability to redirect to test env. Add rome/imex specific builds.
This commit is contained in:
@@ -3,6 +3,7 @@ import log from "electron-log/main";
|
||||
import { GraphQLClient, RequestMiddleware } from "graphql-request";
|
||||
import errorTypeCheck from "../../util/errorTypeCheck.js";
|
||||
import ipcTypes from "../../util/ipcTypes.json";
|
||||
import store from "../store/store.js";
|
||||
|
||||
const requestMiddleware: RequestMiddleware = async (request) => {
|
||||
const token = await getTokenFromRenderer();
|
||||
@@ -20,7 +21,9 @@ const requestMiddleware: RequestMiddleware = async (request) => {
|
||||
};
|
||||
|
||||
const client: GraphQLClient = new GraphQLClient(
|
||||
import.meta.env.VITE_GRAPHQL_ENDPOINT,
|
||||
store.get("app.isTest") || false
|
||||
? import.meta.env.VITE_GRAPHQL_ENDPOINT_TEST
|
||||
: import.meta.env.VITE_GRAPHQL_ENDPOINT,
|
||||
{
|
||||
requestMiddleware,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user