Nested types in Canonicals


Can a Canonical have nested types, i.e. not a flat structure but fields who are themselves canonicals? e.g.

type Child {
  a: string
  b: string
type Parent {
  c: Child


Yes, but if you load Parent canonical data (even if it contains data for Child), only the transforms for Parent will be called. So if you would like to create both ParentEntity and ChildEntity entity types as a result of loading a Parent canonical file, you would need to have two different canonical transform types, e.g. TransformParentToParentEntity and TransformParentToChildEntity.


By the way, here is an example of how this canonical data would be represented in JSON and CSV format:


    c: {
      a: "ONE",
      b: "TWO"
    c: {
      a: "THREE",
      b: "FOUR"



Type references in `make` call in jasmine tests