---
title: "init(sample:quantityHandler:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkquantityseriessamplequery/init(sample:quantityhandler:)"
---

# init(sample:quantityHandler:)

Creates a new series query.

## Declaration

```swift
init(sample quantitySample: HKQuantitySample, quantityHandler: @escaping @Sendable (HKQuantitySeriesSampleQuery, HKQuantity?, Date?, Bool, (any Error)?) -> Void)
```
