<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/EntityQuerySort",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents15EntityQuerySortV"
  },
  "title" : "EntityQuerySort"
}
-->

# EntityQuerySort

The properties to use to sort the results when the query runs.

```
struct EntityQuerySort<Entity> where Entity : AppEntity
```

## Topics

### Getting the property details

[`let by: PartialKeyPath<Entity>`](/documentation/AppIntents/EntityQuerySort/by)

### Getting the sort order

[`let order: EntityQuerySort<Entity>.Ordering`](/documentation/AppIntents/EntityQuerySort/order)

[`enum Ordering`](/documentation/AppIntents/EntityQuerySort/Ordering)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)