Skip to content

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

Closed

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

Activity

  1. parse-github-assistant commented on Jun 9, 2022

    @parse-github-assistant

    Thanks for opening this issue!

    • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
  2. added
    type:bugImpaired feature or lacking behavior that is likely assumed
    on Jun 10, 2022
  3. mtrezza commented on Jul 3, 2022

    @mtrezza
    Member

    Closing via #8032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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