From 54e2609f767a4ad156d2d244b6fbca6920207cc9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 30 Apr 2024 10:26:35 +0100 Subject: [PATCH 1/3] Handle null references when selecting empty in the schema type in the panel --- .../integration/QueryViewerSidePanel/SchemaPanel.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/integration/QueryViewerSidePanel/SchemaPanel.svelte b/packages/builder/src/components/integration/QueryViewerSidePanel/SchemaPanel.svelte index cc5b05a0b0..05579275ef 100644 --- a/packages/builder/src/components/integration/QueryViewerSidePanel/SchemaPanel.svelte +++ b/packages/builder/src/components/integration/QueryViewerSidePanel/SchemaPanel.svelte @@ -25,6 +25,6 @@ name="field" headings options={SchemaTypeOptionsExpanded} - compare={(option, value) => option.type === value.type} + compare={(option, value) => option.type === value?.type} /> {/key} From 5699d28eb61886d1ae158fab3fa77a0749459d30 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 30 Apr 2024 10:26:42 +0100 Subject: [PATCH 2/3] Display json --- packages/builder/src/constants/backend/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index 4b4294dd2e..be8bd75d93 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -253,6 +253,7 @@ export const SchemaTypeOptions = [ { label: "Number", value: FieldType.NUMBER }, { label: "Boolean", value: FieldType.BOOLEAN }, { label: "Datetime", value: FieldType.DATETIME }, + { label: "JSON", value: FieldType.JSON }, ] export const SchemaTypeOptionsExpanded = SchemaTypeOptions.map(el => ({ From ffbbb223e9c172a5febf642fc35a9279566e8180 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 30 Apr 2024 10:39:52 +0100 Subject: [PATCH 3/3] Fix null ref --- .../builder/src/components/integration/RestQueryViewer.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/integration/RestQueryViewer.svelte b/packages/builder/src/components/integration/RestQueryViewer.svelte index 1a12c1fa47..b44831550e 100644 --- a/packages/builder/src/components/integration/RestQueryViewer.svelte +++ b/packages/builder/src/components/integration/RestQueryViewer.svelte @@ -695,7 +695,7 @@ menuItems={schemaMenuItems} showMenu={!schemaReadOnly} readOnly={schemaReadOnly} - compare={(option, value) => option.type === value.type} + compare={(option, value) => option.type === value?.type} /> {/if}