Knowledge graphs sound like the way you represent knowledge in Prolog and Datalog...and so nothing particularly new. Am I wrong?
``` person(mary) person(joe) parent(joe,mary) child(c,p) :- parent(p,c) ```
(Don't quote me on the syntax.) But you can specify what the OP calls "triples" directly in Datalog, express logical relationships among them, and then query them.