Parse is so powerful also because it’s coupled with MongoDB.
I know supporting every Mongo feature is impossible, but case-insensitivity is important.
When read preference was added, it was huge for me.
I know I can always use the Config object to find the “native” collection, but Parse.Query is so simple.
Or maybe it’s just a matter of officially supporting Config . idk
The MongoDB storage adapter of Parse Server already has a caseInsensitive option to add a specific collation for case insensitivity to the find query, specifically it sets { locale: 'en_US', strength: 2 }.
Is that what you are looking for?
If you want to propose exposing exposing more/all of MongoDB’s native collation options, I suggest you open an issue in Parse Server and reference this thread here to make a feature request.
I don’t think it would be too big of a PR adding a custom collation option. It is basically like all the other query options already exposed and passed to the MongoDB driver.
You have my support if you want to start a PR - in that case please re-open the existing issue on Github and let’s continue the conversation there.
I don’t think GraphQL knowledge is needed if you want to implement this feature only in the Parse JS SDK at first to make it available in Cloud Code - if that is what you need.
As I said earlier, if you want to give it a try, I will do my best to support you. You would have good guidance with the existing query options, because they are implemented just the same way the collation option would need to be implemented. It’s more or less just the addition of another parameter.
Ok. I’ll give it a shot again (on September I guess). In my first try, I tried to mimic the readPreference implementation, and it’s in a lot of places.
@oallouch don’t worry for your pull request, after the API REST part will be okay on parse server, some other maintainer will probably take some next parts to integrate it into the global environment (GraphQL, JS SDK, iOS, Android ) ( for exemple I can take over it for the GraphQL part ).