Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Currently null
values used during GraphQL mutation are not transformed by the GraphQL layer, so null
is directly saved into the database. null
in database could lead to unwanted behavior since query like exists: false
will not resolve when the field has a null
value.
Currently the GraphQL API has a lack of support to correctly unset fields. We should transform null
to op Delete
Steps to reproduce
- Create an object via graphql
- Update a field to null
- Query the field object with
exists: false
- Query will not resolve the object
Actual Outcome
null is saved into the DB
Expected Outcome
Null should transformed to undefined into the DB through the GraphQL API
Environment
alpha 5.0
Server
- Parse Server version:
alpha 5.0
- Operating system:
macOs
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
mongo
- Database version:
4.4
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local