In my case the problem was in the app query (the one importing the QL one), I hadn't filled the values for the parameters like needed (the fact that retool shows red errors when you do is pretty misleading) in your case they would be {{i}} and {{oidVariable}} respectively. Found the -scarcely worded- hint here:
Hope it helps