---
title: "fetchHistory(_:)"
framework: swiftdata
role: symbol
role_heading: Instance Method
path: "swiftdata/modelcontext/fetchhistory(_:)"
---

# fetchHistory(_:)

## Declaration

```swift
func fetchHistory<T>(_ descriptor: HistoryDescriptor<T>) throws -> [T] where T : HistoryTransaction
```
