def _load_vertices_from_query(graph, query):
    """Return all vertex data (keyed by @rid) from a given query."""
    return {
        x.oRecordData['rid'].get_hash(): x.oRecordData
        for x in graph.client.query(query, -1)
    }