     var t2i: [Term: TermID]
     var version: Version?
     var next: TermID
+    var graphIDs: Set<TermID>
     
     public init(version: Version? = nil) {
         self.next = 1

    public func load<S: Sequence>(version: Version, quads: S) throws where S.Iterator.Element == Quad {
        self.version = version
        let idq = quads.map { idquad(from: $0) }
        self.count += idq.count
        self.idquads.append(contentsOf: idq)
    }
}

        self.idquads = []
        self.i2t = [:]
        self.t2i = [:]
        self.graphIDs = []
        self.version = version
    }
    
    public func graphs() -> AnyIterator<Term> {
        let graphs = graphIDs.map { i2t[$0]! }
        return AnyIterator(graphs.makeIterator())
    }
    
