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

SequelizeJSON - Invalid Value #25

Open
a-zog opened this issue Sep 19, 2018 · 0 comments
Open

SequelizeJSON - Invalid Value #25

a-zog opened this issue Sep 19, 2018 · 0 comments

Comments

@a-zog
Copy link

a-zog commented Sep 19, 2018

Thank you for this awesome app, tu-ql is really cool

When trying to perform a search on the name field in "Task" model, I tried the SequelizeJSON format as recommended:

QUERY:

query($where: SequelizeJSON) {
  tasks(where: $where) {
    name
  }
}

VARIABLES:

{
  "where": "{\"name\": {\"like\": \"Tas%\"}}"
}

But an error is returned:

"errors": [
    {
      "message": "Invalid value { '$like': 'Tas%' }",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "tasks"
      ]
    }

Any example / best practices to share?

Thanks a lot

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

No branches or pull requests

1 participant