Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
yomybaby opened this issue Jun 9, 2022 · 2 comments · Fixed by #8032
Closed
4 tasks done

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

yomybaby opened this issue Jun 9, 2022 · 2 comments · Fixed by #8032
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@yomybaby
Copy link
Contributor

yomybaby commented Jun 9, 2022

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
@parse-github-assistant
Copy link

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.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jun 10, 2022
@mtrezza mtrezza linked a pull request Jul 3, 2022 that will close this issue
7 tasks
@mtrezza
Copy link
Member

mtrezza commented Jul 3, 2022

Closing via #8032

@mtrezza mtrezza closed this as completed Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants