New Issue Checklist
Issue Description
Mongo explain results incorrectly returning an object instead of an array of objects. This causes an issue for SDKs that use strongly typed languages as results (plural) should always be an array.
This will break any SDK that isn't strongly typed. In the case of the JS SDK, it will break current testcases instead (PR for JS SDK here. In addition, this brings up another issue in the JS SDK which doesn't support explain for first queries.
Originally discussed on community.parseplatform.org
Steps to reproduce
Run any explain query.
Actual Outcome
A single explain object.
Expected Outcome
An array of explain objects that have only 1 object.
Failing Test Case / Pull Request
Environment
Server
- Parse Server version:
4.5.0 and latest master
- Operating system:
docker linux
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
self hosted
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
4.4
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
self hosted
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
Swift SDK
- SDK version:
1.8.3
Logs
New Issue Checklist
Issue Description
Mongo explain results incorrectly returning an object instead of an array of objects. This causes an issue for SDKs that use strongly typed languages as
results(plural) should always be an array.This will break any SDK that isn't strongly typed. In the case of the JS SDK, it will break current testcases instead (PR for JS SDK here.
In addition, this brings up another issue in the JS SDK which doesn't supportexplainforfirstqueries.Originally discussed on community.parseplatform.org
Steps to reproduce
Run any explain query.
Actual Outcome
A single explain object.
Expected Outcome
An array of explain objects that have only 1 object.
Failing Test Case / Pull Request
Environment
Server
4.5.0and latestmasterdocker linuxself hostedDatabase
MongoDB4.4self hostedClient
Swift SDK1.8.3Logs