PrimaryKeyOnly type

Extracts the primary key field from an entity using the centralized PrimaryKeyField type.

See RelationshipInput for usage in mutation input types

type PrimaryKeyOnly<T> = PrimaryKeyField extends keyof T
  ? Pick<T, PrimaryKeyField>
  : never