meteor-collectionapi icon indicating copy to clipboard operation
meteor-collectionapi copied to clipboard

Is there any built-in way to prevent collectionapi from returning the document on $set?

Open wsheldon opened this issue 12 years ago • 3 comments

In my app, my api call is building a fairly large document. For efficiency sake, I don't need it returned to the external device.

I know I can set the fields returned in Meteor.publish however, I still need them within my Meteor app.

Do you know of any way to only return true/false instead?

Thanks!

wsheldon avatar Aug 09 '13 20:08 wsheldon

Hmm, looking in the source, makes me think not possible. Perhaps there's a way to accomplish this deeper in Meteor. Will play around with it a bit.

wsheldon avatar Aug 09 '13 20:08 wsheldon

Curious if you have any thoughts on this. Looks like it's supposed to be returning records.length but instead I'm getting the entire record. This is a PUT api call using $set. Thanks!

wsheldon avatar Aug 14 '13 20:08 wsheldon

Sorry for not getting back to you sooner! It returns the entire record by design as of right now, sorry. I'll leave this issue open as an enhancement request.

crazytoad avatar Aug 17 '13 08:08 crazytoad