diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js
index c0447131b3..76a5717b9d 100644
--- a/packages/builder/src/builderStore/dataBinding.js
+++ b/packages/builder/src/builderStore/dataBinding.js
@@ -48,7 +48,7 @@ export const getDatasourceForProvider = component => {
// Extract datasource from component instance
const datasourceSetting = def.settings.find(setting => {
- return setting.key === def.datasourceSetting
+ return setting.type === "datasource" || setting.type === "table"
})
if (!datasourceSetting) {
return null
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/MySQL.svelte b/packages/builder/src/components/backend/DatasourceNavigator/icons/MySQL.svelte
new file mode 100644
index 0000000000..d2e612e7e3
--- /dev/null
+++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/MySQL.svelte
@@ -0,0 +1,83 @@
+
+
+
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js
index afedb9e78f..4f8d79dbf4 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js
+++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js
@@ -6,6 +6,7 @@ import CouchDB from "./CouchDB.svelte"
import S3 from "./S3.svelte"
import Airtable from "./Airtable.svelte"
import SqlServer from "./SQLServer.svelte"
+import MySQL from "./MySQL.svelte"
export default {
POSTGRES: Postgres,
@@ -16,4 +17,5 @@ export default {
SQL_SERVER: SqlServer,
S3: S3,
AIRTABLE: Airtable,
+ MYSQL: MySQL,
}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewFieldSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewFieldSelect.svelte
index 0e93c3e73a..32935d8d0a 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewFieldSelect.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewFieldSelect.svelte
@@ -12,7 +12,7 @@
export let multiselect = false
$: datasource = getDatasourceForProvider(componentInstance)
- $: schema = getSchemaForDatasource(datasource)
+ $: schema = getSchemaForDatasource(datasource).schema
$: options = Object.keys(schema || {})
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte
index 4e5201a180..6b3873a08c 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte
@@ -34,7 +34,7 @@
}))
return [...acc, ...viewsArr]
}, [])
- $: queries = $backendUiStore.queries.map(query => ({
+ $: queries = $backendUiStore.queries.filter(query => query.queryVerb === "read").map(query => ({
label: query.name,
name: query.name,
tableId: query._id,
diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte
index fa1a681f12..77f6d51476 100644
--- a/packages/builder/src/components/integration/QueryViewer.svelte
+++ b/packages/builder/src/components/integration/QueryViewer.svelte
@@ -167,7 +167,10 @@