move db in graphs constructor to options
change API from graphs.set to graphs.use