From the question it sounds that you are using TypeScript to write a function on Object function, and you decorate it with the @query decorator
If that is true, then I would start by debugging the function within the function repository using the preview and even the debugger.
After you have it working and publish a fixed version you can try and call it from your OSDK application. – I would also recommend looking at the network tab of the call and making sure the request is what you expect (similar to the rest call on the documentation page)
For reference, the issue was that I didn’t imported correctly the Links and Objects in my OSDK application, that my Function was using. Importing them made it work
Additional information was available in the Developer Console, where it actually warned me that some imports were required.