In the examples we only see cloud code functions returning an int or bool. I’m wondering if it’s possible to return a custom subclass similar to what can be done using PFQuery.
What do you mean by subclass? You can return any class or even json or array. İf you are talking about the subclasses you register(that was how it’s done in android, im not sure about iOS SDK) they are also normal class.
For example you created a subclass ‘Car’ which extends from ParseObject ( or PFObject in iOS im not sure) it’s actually normal class. You can return it like this
const getCars = new Parse.Query('Car'); return await getCars.flnd();
SDK will automatically cast this response to Car subclass.