diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index ea2b5a94a4..78c5a7fa9a 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -33,7 +33,7 @@ { label: "Datetime", value: "DATETIME" }, ] - $: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) + $: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) $: query.schema = fields.reduce( (acc, next) => ({ ...acc, @@ -48,6 +48,8 @@ $: integrationInfo = $integrations[datasourceType] $: queryConfig = integrationInfo?.query $: shouldShowQueryConfig = queryConfig && query.queryVerb + $: readQuery = query.queryVerb === "read" || query.readable + $: queryInvalid = !query.name || (readQuery && data.length === 0) function newField() { fields = [...fields, {}] @@ -152,7 +154,7 @@