Closed ES5017 closed 5 years ago
Hi @ES5017 I see that you were able to get more clarity on this issue through our Gitter (https://gitter.im/mongodb/stitch). I will close this issue for now. Please open a new issue if you have any further problems using the SDK!
For anyone who also experiences this issue, the problem is that this is a projection feature that is currently unsupported via MongoDB Stitch. Adding support for all the projection features is on the roadmap for the next month or so.
stitch query failed with error serviceError(withMessage: "invalid %project specification: projection string value must start with a \'%\': {\"pendingRequestsSent\":{\"$elemMatch\":{\"firebaseUserId\":\"AQym4EGUgMOhwUFbp1LASJwyYlN2\"}}}", withServiceErrorCode: StitchCoreSDK.StitchServiceErrorCode.invalidParameter)
This is not mentioned anywhere in the docs. Printed query looks like this:
{ "pendingRequestsSent" : { "$elemMatch" : { "firebaseUserId" : "AQym4EGUgMOhwUFbp1LASJwyYlN2" } } }
Copied and pasted into mongo shell projection parameter, and it works fine.