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

NOT_LIKE operator not working #2427

Closed
nguyentrongbang opened this issue Jul 29, 2023 · 1 comment · Fixed by #2432
Closed

NOT_LIKE operator not working #2427

nguyentrongbang opened this issue Jul 29, 2023 · 1 comment · Fixed by #2432
Labels
bug An error within Lighthouse

Comments

@nguyentrongbang
Copy link

Describe the bug
When using NOT_LIKE operator, it returns empty result.

Query:

query {
  songs(
    first: 5
    where: {AND: [{column: "title", operator: NOT_LIKE, value: "Bài ca đi cùng năm tháng%"}]}
  ) {
    data {
      id
      slug
      title
    }
  }
}

Result:

{
  "data": {
    "songs": {
      "data": []
    }
  }
}

Expected behavior/Solution

It should return non empty result

Steps to reproduce

Just use NOT_LIKE operator in the query

Output/Logs

Here is the mysql log:

DB::listen(function($query) {
           Log::info(
               $query->sql,
               $query->bindings
           );
       });
select * from `song` where (`title` = ?) and `song`.`deleted_at` is null limit 6 offset 0 ["NOT_LIKE"] 

Lighthouse Version
6.6.0

@spawnia spawnia added the bug An error within Lighthouse label Aug 4, 2023
@spawnia
Copy link
Collaborator

spawnia commented Aug 4, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error within Lighthouse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants