Skip to content

include on Queries can cause root query to fail with 101 when an included pointer is deleted / unreadable, without indicating which parent field failed. #9869

@swittk

Description

@swittk

New Issue Checklist

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

  1. Create a new post with a valid user const post = new Post({ title, message, author: Pointer<_User> }); await post.save().
  2. Delete that author user (or make it unreadable to the requesting client).
  3. 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

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions