 import Vapor
 import FluentProvider
 import Foundation
+
+/**
+    Implements callbacks for the Graph sync lifecycle
+ */
+public protocol GraphSyncDelegate {
+    func graphWillSync() throws
+    func graphDidSync()
+}
 
 open class Graph : GraphSynchronizable {
     /**

                try store.sync(executor: executor, force: force)
            }
        }
    }
    
    // MARK: Private

    
    private var _store : [String: GraphModelStore] = [:]
    public var context : Context = emptyContext
    public var syncDelegate : GraphSyncDelegate? = nil
    
    public func store<T>(forType: T.Type) -> GraphModelStore? where T : Entity {
        return _store[forType.entity]
