diff --git a/src/app/services/slices/graph-response.slice.ts b/src/app/services/slices/graph-response.slice.ts index 78da5fd32..76ffd51cf 100644 --- a/src/app/services/slices/graph-response.slice.ts +++ b/src/app/services/slices/graph-response.slice.ts @@ -39,6 +39,7 @@ const initialState: IGraphResponse = { isLoadingData: false, response: { body: undefined, + headers: {} } }; @@ -55,7 +56,6 @@ export const runQuery = createAsyncThunk( ? await authenticatedRequest(query) : await anonymousRequest(query, getState); const resp = response as Response; - const respHeaders = (resp).headers; const result: Result = await processResponse(resp, dispatch, query); @@ -63,7 +63,7 @@ export const runQuery = createAsyncThunk( const status = generateStatus({ duration, response: resp }); dispatch(setQueryResponseStatus(status)); - const historyItem = generateHistoryItem(status, respHeaders, query, createdAt, result, duration); + const historyItem = generateHistoryItem(status, {}, query, createdAt, result, duration); dispatch(addHistoryItem(historyItem)); return result; diff --git a/src/app/views/query-runner/QueryRunner.tsx b/src/app/views/query-runner/QueryRunner.tsx index 13acff72f..6c4b76714 100644 --- a/src/app/views/query-runner/QueryRunner.tsx +++ b/src/app/views/query-runner/QueryRunner.tsx @@ -45,6 +45,7 @@ const QueryRunner = (props: any) => { }; const handleOnRunQuery = (query?: IQuery) => { + console.log('query stuff', query) let sample = { ...sampleQuery }; if (sampleBody && sample.selectedVerb !== 'GET') { const headers = sample.sampleHeaders; @@ -75,6 +76,7 @@ const QueryRunner = (props: any) => { } } + console.log('sample before dispatch', sample) dispatch(runQuery(sample)); const sanitizedUrl = sanitizeQueryUrl(sample.sampleUrl); const deviceCharacteristics = telemetry.getDeviceCharacteristicsData();