Query Set Of Objects

If you just need to get the query results, do not write anything after the name. Such query will use .query from the driver:

queries.edgeql:

# name: select-all-users
SELECT Person {
    first_name,
    last_name,
    age
}

And python code:

import edgedb
from edgeql_queries import from_path

conn = edgedb.connect()
queries = from_path("./queries.edgeql", async_driver=False)

users = queries.select_all_users(conn)
for user in users:
    print("user:", user.first_name)