-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
Queries that use include (e.g. include=author,comments.author) fail the entire root query with ParseError 101 (OBJECT_NOT_FOUND) if any included pointer can’t be resolved (e.g. deleted child, ACL/CLP denied). The error doesn’t identify which parent object / field caused the failure, making it hard to handle gracefully.
This also affects single-object reads done via fetchWithInclude (JS SDK).
Steps to reproduce
- Create a new post with a valid user
const post = new Post({ title, message, author: Pointer<_User> }); await post.save()
. - Delete that author user (or make it unreadable to the requesting client).
- GET /classes/Post?include=author (or run an equivalent SDK query).
Actual Outcome
101 (OBJECT_NOT_FOUND) error for the whole query.
Expected Outcome
Return the Post and surface the missing include in a tolerant way (e.g., author: null) or provide error context indicating which include failed, with potentially a way to handle the nested fields when unavailable.
Proposal : a backwards-compatible option of per-request override: includeMissing=<error|null|unset|pointer> forwarded to the include resolver.
- 'error' (default) : current behavior.
- 'null': set missing child to null (arrays keep position with null).
- 'unset': remove the field; arrays drop missing items.
- 'pointer': returns unresolved items as raw pointer JSON.
Environment
Server
- Parse Server version:
any
- Operating system:
any
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
any
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
8
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Self hosted
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JS
- SDK version:
6.x