[SOLVED] Query equalTo on a pointer in cloud

I want to query based on a pointer. I can run it in local absolutely fine, but I can’t pass the pointer as a parameter to cloud functions. Any solutions to this?

Also extra question, how do I make it equalTo child of an attribute? So I want something like query.equalTo(‘collection.id’, x)


You can try to send the object id to the cloud function, or to send a json dumped as a string and convert it back to an object in cloud code.

Hello, sending the objectId returns nothing. I checked, it’s the same id.

Sending it as stringified gives this error: ‘Error: You cannot use [object Object] as a query parameter.’ after parse.

you may have to create a pointer object after you have the id

this example may help you: Query property values of included pointer objects

1 Like

It works, thanks a lot!

1 Like