---
title: AnyEntityQuery
framework: appintentstesting
role: symbol
role_heading: Structure
path: appintentstesting/anyentityquery
---

# AnyEntityQuery

A type-erased, intermediate representation of your entity query for testing purposes.

## Declaration

```swift
struct AnyEntityQuery
```

## Overview

Overview The AnyEntityQuery structure resolves to your concrete query type, and allows you to test your entity queries and verify their results as shown in the following example: let landmarkDef = definitions.entities["LandmarkEntity"]

// Query by string. let stringQueryResults = try await landmarkDef.entities(matching: "Yosemite")

// Query by identifiers. let specific = try await landmarkDef.entities(identifiers: ["yosemite-falls"])

// Get all entities. let all = try await landmarkDef.allEntities()

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Intermediate types

- [AnyAppIntent](appintentstesting/anyappintent.md)
- [AnyAppEntity](appintentstesting/anyappentity.md)
- [AnyAppEnum](appintentstesting/anyappenum.md)
- [AnyTransientAppEntity](appintentstesting/anytransientappentity.md)
