Moved graph to using datastore interface for query