1. A computer system comprising: at least one processor; and at least one memory storing: a plurality of saved queries, each query defined by one or more constraints to be satisfied for membership in query results for the query, each constraint specifying at least one edge from a knowledge base storing nodes connected by edges, an index of the constraints by edge, the index being organized by edge, and instructions that, when executed by the at least one processor, cause the system to: identify, using the index, a target constraint responsive to an operation that updates the knowledge base with a source node, an update edge, and a target node, the target constraint specifying a path that includes the update edge and the target constraint belonging to a first saved query, evaluate the target constraint for a member node to determine a state for the target constraint by traversing the knowledge base via the path of the target constraint, determine, using the state, whether the state results in a change to a saved query result for the first saved query, and update the saved query result responsive to determining the state results in a change.