Skip to content

additional where calauses (whereIn, whereNotIn) errors #2003

@mostafa-rz

Description

@mostafa-rz

Describe the bug

In the documents provide that you can use other where clauses from Laravel providers. In these cases whereIn and whereNotIn, I got an error.

Expected behavior/Solution

Current solution: Using @in directive.
Expected behavior: Have the data with whereIn or whereNotIn filter.
Reason: This line must be the value for these clauses, not the operator.

Steps to reproduce

  1. create a query and use @where directive with clause: "whereIn" attribiute.
type Query {
    dog(
        id: ID @where(clause: "whereIn", key: "id")
    )}
  1. run the query.

Output/Logs

Click to expand
"debugMessage": "Illuminate\\Database\\Query\\Builder::cleanBindings(): Argument #1 ($bindings) must be of type array, string given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php on line 972"

Lighthouse Version

v5.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsConcerns the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions