API Reference

Discover (LAN)

Discover other PlainApp instances on the local network (LAN/Wi-Fi Aware). Discovery is the first step before pairing — once a device is discovered, call a pairing mutation in the Pairing section.

Type Definitions

bash
# Discovery uses UDP broadcast on the LAN and (optionally) Wi-Fi Aware.
# Discovered devices are not persisted; call isDiscovering to poll state.
# Use the NearbyViewModel events / WebSocket push channel to receive the
# live list of discovered devices.

Operations

mutation

startDiscovery

Start scanning the local network for PlainApp peers. Returns immediately; results are pushed via the WebSocket event channel and surfaced in the Nearby UI.

bash
mutation StartDiscovery {
  startDiscovery
}
mutation

stopDiscovery

Stop an in-progress discovery scan.

bash
mutation StopDiscovery {
  stopDiscovery
}
query

isDiscovering

Whether a discovery scan is currently running.

bash
query IsDiscovering {
  isDiscovering
}