Skip to content

Commit

Permalink
Merge pull request #188 from FalkorDB/fix-create-graph
Browse files Browse the repository at this point in the history
Fix #183 create graph
  • Loading branch information
AviAvni authored Apr 21, 2024
2 parents 90574b8 + c425f82 commit 52f3b61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/graph/mainQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ export default function MainQuery({ onSubmit, onDelete, className = "" }: {
}

const addOption = (newGraph: string) => {
const q = "return 1"
fetch(`api/graph?graph=${encodeURIComponent(newGraph)}&query=${encodeURIComponent(q)}`, {
method: "GET",
})
setGraphs((prevGraphs: string[]) => [...prevGraphs, newGraph]);
setGraphName(newGraph)
}
Expand Down

0 comments on commit 52f3b61

Please sign in to comment.