Skip to content

GraphQL query transformer drop the condition on the object field with false value #8031

Closed
@yomybaby

Description

@yomybaby

New Issue Checklist

Issue Description

On graphql where input has a condition on the object field with false value. Graphql query transformer drop that condition.

Steps to reproduce

  • Create Class and add object filed(someObjectField).
  • Create object with object field
{
  foo: { bar: 'baz', qux: true },
  number: 10,
};
  • GraphQL query with below condition
const whereWithQuxFalse = {
  someObjectField: {
    notEqualTo: { key: 'foo.bar', value: 'bat' },
    greaterThan: { key: 'number', value: 9 },
    lessThan: { key: 'number', value: 11 },
    equalTo: { key: 'foo.qux', value: false },
  },
};

Actual Outcome

query result has an object.

Expected Outcome

query result shouldn't have an object. Because object has foo.qux:true and query condition has equalTo: { key: 'foo.qux', value: false },

Environment

~5.x.x
(Maybe 4.x.x has a same bug)

Server

  • Parse Server version: 5.x.x
  • Operating system: MacOS 12.4
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions