Skip to content

Commit

Permalink
Merge pull request #148 from FalkorDB/default-query
Browse files Browse the repository at this point in the history
fix #139 change the default query
  • Loading branch information
AviAvni authored Apr 4, 2024
2 parents d76e62b + 357cdb6 commit 1ff0ca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/graph/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,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',
Expand Down
2 changes: 1 addition & 1 deletion app/graph/query.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function Query({ onSubmit, onQueryUpdate, className = "" }: {
</div>
<div className="flex flex-row space-x-3 w-full md:w-8/12 items-center">
<Input id="query" className="border-gray-500 w-full"
placeholder="MATCH (n)-[e]-() RETURN n,e limit 100" type="text" onChange={(event) => 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)} />
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
Expand Down

0 comments on commit 1ff0ca3

Please sign in to comment.