Skip to content

Commit 6b14e92

Browse files
Add feedback for empty Cypher query results (#26)
1 parent 8982cb1 commit 6b14e92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/OutputPanel.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ const runCypher = async (cypher) => {
3737
relationships.value = res.graph.relationships
3838
rows.value = res.table.rows
3939
columns.value = res.table.columns
40+
if (!nodes.value.length && !rows.value.length) {
41+
errorText.value = 'Query executed successfully, No matching data was found.'
42+
tab.value = 'error'
43+
loading.value = false
44+
return
45+
}
4046
if (!nodes.value.length) {
4147
tab.value = 'table'
4248
}

0 commit comments

Comments
 (0)