I do agree that AOTGenerator is agnostic of what the graphs use. That is indeed mostly due to the reason that graphs can live in scenes which is a total pain to parse as you know. This is why AOT classes are simply generated based on what types exist in the Preferred Types Editor. Of course, only struct are used as generic arguments, since only structs have a problem with AOT (as far as generics go). Does the number of classes generated bothering you for performance reasons or something else?
Can you please clarify what the problem with where T:class is? As explained above, only generics that use structs as arguments are AOT generated. where T:class denotes that the argument is not a struct (its a class 🙂 ). This is why there is no generation done for Template since it is not really needed for AOT.