Change compare view default result set name

This changes the default result set that is selected in the compare view
to the same as the default result set in the results view. This will
select `#select` by default for most queries, rather than the first
result set, which could be `edges` or `nodes` for some queries.
This commit is contained in:
Koen Vlaswinkel
2023-12-06 15:10:49 +01:00
parent 151c031732
commit 71d4fd7b0a

View File

@@ -1,4 +1,5 @@
import { BQRSInfo } from "../common/bqrs-cli-types";
import { getDefaultResultSetName } from "../common/interface-types";
export async function findResultSetNames(
fromSchemas: BQRSInfo,
@@ -30,7 +31,8 @@ export async function findResultSetNames(
);
}
const currentResultSetName = selectedResultSetName || commonResultSetNames[0];
const currentResultSetName =
selectedResultSetName ?? getDefaultResultSetName(commonResultSetNames);
const fromResultSetName = currentResultSetName || defaultFromResultSetName!;
const toResultSetName = currentResultSetName || defaultToResultSetName!;