From bfeddab1cb62a10ef104eda870adb0593bbbed40 Mon Sep 17 00:00:00 2001 From: Anchel123 <110421452+Anchel123@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:59:08 +0300 Subject: [PATCH 1/2] change the default query --- app/graph/query.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graph/query.tsx b/app/graph/query.tsx index 875cb39f..e94b3a99 100644 --- a/app/graph/query.tsx +++ b/app/graph/query.tsx @@ -58,7 +58,7 @@ export function Query({ onSubmit, onQueryUpdate, className = "" }: {
setQuery(event.target.value)} /> + placeholder="MATCH (n) OPTIONAL MATCH (n)-[e]-(m) RETURN n,e,m limit 100" type="text" onChange={(event) => setQuery(event.target.value)} /> From 6a66102db0dccc8619ae0912d5d0bd3244aeb74d Mon Sep 17 00:00:00 2001 From: Anchel123 <110421452+Anchel123@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:12:06 +0300 Subject: [PATCH 2/2] change the default query that send to the graph --- app/graph/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graph/page.tsx b/app/graph/page.tsx index 2b179edc..07e6eb6f 100644 --- a/app/graph/page.tsx +++ b/app/graph/page.tsx @@ -53,7 +53,7 @@ export default function Page() { // Proposed abstraction for improved modularity if (!validateGraphSelection(state.graphName)) return; - const q = state.query.trim() || "MATCH (n)-[e]-() RETURN n,e limit 100"; + const q = state.query.trim() || "MATCH (n) OPTIONAL MATCH (n)-[e]-(m) RETURN n,e,m limit 100"; const result = await fetch(`/api/graph?graph=${prepareArg(state.graphName)}&query=${prepareArg(q)}`, { method: 'GET',