type Primary @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) {
  id: ID! @primaryKey
  secret: String @auth(rules: [{ allow: owner }])
  relatedMany: [RelatedMany] @hasMany
  relatedOne: RelatedOne @hasOne
}

type RelatedMany @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) {
  id: ID! @primaryKey
  secret: String @auth(rules: [{ allow: owner }])
  primary: Primary @belongsTo
}

type RelatedOne @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) {
  id: ID! @primaryKey
  secret: String @auth(rules: [{ allow: owner }])
  primary: Primary @belongsTo
}

type ManyLeft @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) {
  id: ID! @primaryKey
  secret: String @auth(rules: [{ allow: owner }])
  manyRight: [ManyRight] @manyToMany(relationName: "leftRightJoin")
}

type ManyRight @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner }]) {
  id: ID! @primaryKey
  secret: String @auth(rules: [{ allow: owner }])
  manyLeft: [ManyLeft] @manyToMany(relationName: "leftRightJoin")
}
