---
title: ModelContext.NotificationKey
framework: swiftdata
role: symbol
role_heading: Enumeration
path: swiftdata/modelcontext/notificationkey
---

# ModelContext.NotificationKey

Describes the data in the user info dictionary of a notification sent by a model context.

## Declaration

```swift
enum NotificationKey
```

## Topics

### Accessing notification keys

- [ModelContext.NotificationKey.deletedIdentifiers](swiftdata/modelcontext/notificationkey/deletedidentifiers.md)
- [ModelContext.NotificationKey.insertedIdentifiers](swiftdata/modelcontext/notificationkey/insertedidentifiers.md)
- [ModelContext.NotificationKey.invalidatedAllIdentifiers](swiftdata/modelcontext/notificationkey/invalidatedallidentifiers.md)
- [ModelContext.NotificationKey.updatedIdentifiers](swiftdata/modelcontext/notificationkey/updatedidentifiers.md)
- [ModelContext.NotificationKey.queryGeneration](swiftdata/modelcontext/notificationkey/querygeneration.md)
- [ModelContext.NotificationKey.historyTokens](swiftdata/modelcontext/notificationkey/historytokens.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)

## See Also

### Registering for notifications

- [willSave](swiftdata/modelcontext/willsave.md)
- [didSave](swiftdata/modelcontext/didsave.md)
