Closed donstephan closed 2 years ago
Hi @donstephan , great job there!
We are also using and relying heavily on Grapher in production and would like to upgrade to the newest Meteor version. I guess my question is:
Are you already using your changes in production on your end? Did any bugs/errors pop up?
Thanks a lot!
Haven't used on production yet. I'm still not ready to make the bump to meteor 2.6+ yet. Grapher tests are passing using mongo 5 and it should be good to go but feel free to fork and test locally in your project as needed. If you have any issues just let me know and I'll get this PR updated.
Also meteor version 2.5.7 is a good step if you haven't upgraded to that yet. It gets you node 14 without this PR being finished.
I use Grapher with Meteor 2.7.3 with no issues but I don't use publications, only queries.
Thank you ! This PR fix issues I had when updating to 2.7.3, related to aggregate function arguments.
MongoInvalidArgumentError: Method "collection.aggregate()" accepts at most two arguments
at Collection.aggregate
[...]
(packages/cultofcoders:grapher/lib/aggregate.js:6:18)
@StorytellerCZ do you think this could be merged and published to atmosphere ? Thanks
I'll look into publishing it today with some other things as well.
See #466 for continuation of this.
Anyone ran into this error yet?
Exception while invoking method 'named_query_listsQuery' MongoInvalidArgumentError: Argument "options" must not be function
Got it after my update. any ideas on this?
@Twisterking
"
The method and publication names we create are: named_query_${queryName}
, and as argument they accept the params
object.
Meaning you can do:
Meteor.call('named_query_userAdminList', params, callback)
Meteor.subscribe('named_query_userAdminList', params)
"Is there any chance that in a Meteor.call you forgot the params object and your call takes the callback as params?
I already found the culprit! It was https://github.com/meteorhacks/meteor-aggregate, a very old package I still had installed. This somehow interfered with the new grapher version (I guess maybe it overwrote Mongo.Collection.prototype.aggregate
or something like this) and resulted in the error above.
tl;dr: Do NOT use https://github.com/meteorhacks/meteor-aggregate together with Grapher 1.4!
@Twisterking I remember this one. The way it has been recently fixed in grapher can be seen here moving from v3 to v4. At that time I just dropped v3 all together. I'll take a look at meteor-aggregate see where this might pe coming from.
https://github.com/cult-of-coders/grapher/blob/master/lib/aggregate.js
Fixes the main two issues with upgrades to Mongo 5:
Also added in a docker-compose file for consistent environments with local development.
Lastly fixed some tests that reference maps since now Meteor uses actual Maps to represent local collections.