--- description: Extract connection list items (table rows, list entries) into their own fragment component globs: "**/*.tsx" alwaysApply: false --- # Extract connection items into fragment components When rendering items from a Relay connection (e.g. `edges.map(…)`), each item MUST be rendered by a dedicated component that owns its own fragment — never inline the rendering of node fields directly in the parent's `.map()` body. This ensures: - Data requirements are colocated with the rendering component - Adding/removing fields in an item doesn't bloat the parent's fragment - The item component is independently testable and reusable ## Pattern ```tsx // _components/ThingListItem.tsx — owns its fragment const thingListItemFragment = graphql` fragment ThingListItem_thing on Thing { id name status } `; interface ThingListItemProps { thingKey: ThingListItem_thing$key; } export function ThingListItem({ thingKey }: ThingListItemProps) { const thing = useFragment(thingListItemFragment, thingKey); return (