netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.24k stars 2.59k forks source link

GraphQL filter for "ip_address_list" - Filter query tag works not as accepted #16305

Open SchmidtJonathan1 opened 5 months ago

SchmidtJonathan1 commented 5 months ago

Deployment Type

Self-hosted

NetBox Version

v4.0.3

Python Version

3.12

Steps to Reproduce

When a query is created in Graphql Explorer that accesses the class "ip_address_list". Cannot be filtered by "tags" as there is only one parameter called "tag".

#Graphql query:

query MyQuery {
  ip_address_list(filters: {tag: "Gateway"}) {
    tags{
      name
    }
  }
}

Expected Behavior

{
  "data": {
    "ip_address_list": [
      {
        "id": "15",
        "tags": [
          {
            "name": "Gateway"
          }
        ]
      }
}

Observed Behavior

{
  "data": {
    "ip_address_list": [
      {
        "id": "2",
        "tags": []
      },
      {
        "id": "3",
        "tags": []
      },
      {
        "id": "4",
        "tags": []
      },
      {
        "id": "15",
        "tags": [
          {
            "name": "Gateway"
          }
        ]
      }
}
fooker commented 4 months ago

Hi, I would like to tackle this issue (CC @jeffgdotorg)

arthanson commented 3 months ago

@fooker any updates on this? Are you still able to work on this?