# Query

    protocol Query<Element> : Sendable

Represents a query against the User's home graph.
- `


  ### [Element](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query#/s:13GoogleHomeSDK5QueryP7ElementQa)


  ` Undocumented

  #### Declaration

  Swift

      associatedtype Element : Hashable, Sendable

- `


  ### [stream()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query#/s:13GoogleHomeSDK5QueryP6stream7Combine12AnyPublisherVyAA0B12ObjectUpdateOy7ElementQzGAA0B5ErrorVGyF)


  ` Returns a Publisher that emits each object individually. Initial and future state is emitted.

  #### Declaration

  Swift

      func stream() -> AnyPublisher<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Enums/HomeObjectUpdate.html<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html#/s:13GoogleHomeSDK5QueryP7ElementQa>, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [batched()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query#/s:13GoogleHomeSDK5QueryP7batched7Combine12AnyPublisherVyShy7ElementQzGAA0B5ErrorVGyF)


  ` Returns a Publisher that emits the current result as a Set of objects. Each emitted `Set`
  represents the current state of the User's object graph.

  #### Declaration

  Swift

      func batched() -> AnyPublisher<Set<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html#/s:13GoogleHomeSDK5QueryP7ElementQa>, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html>

- `


  ### [list()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query#/s:13GoogleHomeSDK5QueryP4listShy7ElementQzGyYaKF)


  ` Returns the current result as a Set of objects.

  #### Declaration

  Swift

      func list() async throws -> Set<https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Query.html#/s:13GoogleHomeSDK5QueryP7ElementQa>