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 boolean filters are borked #233

Closed
dgjustice opened this issue Apr 2, 2021 · 1 comment · Fixed by #246
Closed

GraphQL boolean filters are borked #233

dgjustice opened this issue Apr 2, 2021 · 1 comment · Fixed by #246
Assignees
Labels
type: bug Something isn't working as expected
Milestone

Comments

@dgjustice
Copy link
Contributor

Environment

  • Python version: 3
  • Nautobot version: develop

Steps to Reproduce

{
  devices(has_primary_ip:"False") {
    name
  }
}
{
  "errors": [
    {
      "message": "unhashable type: 'list'",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "devices"
      ]
    }
  ],
  "data": {
    "devices": null
  }
}```

### Expected Behavior
A list of devices

### Observed Behavior
An error
@jathanism
Copy link
Contributor

There is currently a known issue we are working on reflecting 100% of filtering or lookup using virtual fields. In this context a virtual field is any non-concrete database field, whether that is a computed model field (such as IPAddress.address or a filter field such as Device.has_primary_ip.

We have a pending fix to address this for IPAddress.address and also fix filtering on method-based filter fields (which most virtual filter fields are), but it's not comprehensive enough to address the root cause here.

Reference: #225

In any case, thanks for the report, since it's highlighting that this is a bigger issue.

@jathanism jathanism added type: bug Something isn't working as expected status: under review labels Apr 2, 2021
@dgjustice dgjustice reopened this Apr 2, 2021
@jathanism jathanism self-assigned this Apr 5, 2021
@jathanism jathanism added this to the v1.0.0 milestone Apr 5, 2021
@jathanism jathanism added this to To do in Release v1.0.0 via automation Apr 5, 2021
@jathanism jathanism moved this from To do to In progress in Release v1.0.0 Apr 5, 2021
Release v1.0.0 automation moved this from In progress to Done Apr 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants