cult-of-coders / grapher

Grapher: Meteor Collection Joins + Reactive GraphQL like queries
https://atmospherejs.com/cultofcoders/grapher
MIT License
275 stars 53 forks source link

Queries using the `$expr` operator throw against MongoDB 4.4+ #453

Closed mfen closed 2 years ago

mfen commented 3 years ago

MongoDB 4.4 added a restriction on $ prefixed field paths whereas previous versions would ignore them. Grapher seems to have missed $expr when preventing operators from ending up in the fields projection, causing:

MongoError: FieldPath field names may not start with '$'.

Our tests caught this upgrading to Meteor 2.2 which upgraded the embedded MongoDB version to 4.4 (changelog).