The compiler knows basic information about the built-in API, so it should be able to perform some simple checks on queries containing those API calls.
At a minimum, it can check the number of arguments match. Depending on available type information, it might also be able to typecheck the arguments.