Misleading Parse Server 3.0 migration guide for aggregate function

62 views
Skip to first unread message

Karen Frangulyan

unread,
Jun 8, 2019, 5:31:36 PM6/8/19
to Back4App
Hey guys,

Just wanted to clarify the changes needed when I call the aggregate function in Parse Server 3.0+ context. In your migration guide here you tell the users that we "need the pipeline key in the pipeline object". I did that in my cloud codes but unfortunately was getting some weird crashes with { code: 1 }.

Then I checked the Parse Server release notes here on github and found this line: "The aggregate now require aggregates to be passed in the form: {"pipeline": [...]} (Rest API Only)". That's the only place where it says "Rest API Only" (pretty lucky I saw it) so I decided to dig deeper into their codes to understand what does it mean. I noticed that in Cloud Codes they didn't change much related to pipelines. I went ahead an rolled back my changes that your migration guide offered me to do and I got no crashes anymore! So maybe this was changed in JS API which is used from web and not from Cloud Code?

Please check this and let me know. If that's the case then please update the migration guide, it might be useful for other developers too.

Thanks!

Davi Macêdo

unread,
Jun 17, 2019, 12:42:33 AM6/17/19
to Back4App
Hi Karen.

Thanks for reporting. It seems that our docs are wrong regarding cloud code/JS SDK. You should use this format here (without the "pipeline" key) both for cloud code and client code using JS SDK: https://docs.parseplatform.org/js/guide/#aggregate

I will ask the team to update our docs.

Best!
Reply all
Reply to author
Forward
0 new messages