Create a Builder interface for typed graphs.

Also, add a builder interface for rules that is still undefined.