Revert "Revert "Change $link and $query resource to public""

This reverts commit 44dface562adec1395adb01ca84dd975083fabe5.