The use case is to determine if a deeplink is routable/defined, before attempting to navigate and if it is not defined to route differently.
I came up with the following solution, but was curious if there is a more elegant/differently solution.
@SuppressLint("RestrictedApi")
fun NavController.isDeepLinkDefined(deeplink: Uri, action: String, mimeType: String): Boolean {
return graph.matchDeepLink(NavDeepLinkRequest(deeplink, action, mimeType)) != null
}