Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .mise/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
[tools]
node = "22"
pnpm = "9"

[tasks.validate]
description = "Run all validation checks (install, typecheck, lint, test, knip)"
run = """
pnpm install --frozen-lockfile
pnpm typecheck
pnpm lint
pnpm test
pnpm knip
"""
16 changes: 15 additions & 1 deletion packages/frontend/src/views/GraphQLViewMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,28 @@ const parseHttpRaw = (raw: string) => {
return { method, headers, body };
};

const isResponseContent = (raw: string | undefined): boolean => {
if (raw === undefined || raw === "") return true;
return raw.trimStart().startsWith("HTTP/");
};

const getRawData = computed((): string => {
if (isReplayTab.value) {
const editor = props.sdk.window?.getActiveEditor?.();
if (editor !== undefined && editor !== null) {
const editorView = editor.getEditorView();
if (editorView !== undefined && editorView !== null) {
const raw = editorView.state.doc.toString();
if (raw !== undefined && raw !== null && raw !== "") return raw;
if (!isResponseContent(raw)) {
return raw;
}
}
}

if (cachedEditorView.value !== undefined) {
const raw = cachedEditorView.value.state.doc.toString();
if (!isResponseContent(raw)) {
return raw;
}
}
}
Expand Down
Loading