RelationshipResult type

How a relationship appears in a mutation result: an object containing only the related entity's key, returned as id.

type RelationshipResult<T> = [RelationshipKeyField<T>] extends [never]
  ? never
  : Record<PrimaryKeyField, NonNullable<T[RelationshipKeyField<T>]>>