interpolate vars correctly fixes #704 (#2317)

This commit is contained in:
Jack Evans 2024-06-19 07:36:45 -03:00 committed by GitHub
parent 9ec67b5da9
commit b432e94a4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -744,11 +744,11 @@ const registerNetworkIpc = (mainWindow) => {
});
});
ipcMain.handle('fetch-gql-schema', async (event, endpoint, environment, request, collection) => {
ipcMain.handle('fetch-gql-schema', async (event, endpoint, environment, _request, collection) => {
try {
const envVars = getEnvVars(environment);
const collectionRoot = get(collection, 'root', {});
const preparedRequest = prepareGqlIntrospectionRequest(endpoint, envVars, request, collectionRoot);
const request = prepareGqlIntrospectionRequest(endpoint, envVars, _request, collectionRoot);
request.timeout = preferencesUtil.getRequestTimeout();
@ -778,16 +778,16 @@ const registerNetworkIpc = (mainWindow) => {
scriptingConfig
);
interpolateVars(preparedRequest, envVars, collection.collectionVariables, processEnvVars);
interpolateVars(request, envVars, collection.collectionVariables, processEnvVars);
const axiosInstance = await configureRequest(
collection.uid,
preparedRequest,
request,
envVars,
collection.collectionVariables,
processEnvVars,
collectionPath
);
const response = await axiosInstance(preparedRequest);
const response = await axiosInstance(request);
await runPostResponse(
request,