Skip to content

Commit 8741ebc

Browse files
author
tomnijhof
committed
use cypher variables
Signed-off-by: tomnijhof <tom.nijhof@cytosmart.com>
1 parent 0b61c73 commit 8741ebc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ async def read_item(package_names: list):
2929
response = graph.run(
3030
f"""
3131
MATCH (n:Package)-[:DEPENDS_ON*0..]->(m:Package)
32-
WHERE n.name in {package_names}
32+
WHERE n.name in $package_names
3333
WITH DISTINCT m as p
3434
RETURN DISTINCT p.license as licenses, collect(p.name) as packageNames, sum(p.package_size) as totalSizeBytes
35-
"""
35+
""",
36+
package_names=package_names,
3637
).data()
3738

3839
# Not all packages will be found

0 commit comments

Comments
 (0)