Skip to content

Cannot filter ip range based on parent prefixΒ #17681

@kuon

Description

@kuon

Deployment Type

Self-hosted

NetBox Version

v4.1.1

Python Version

3.12

Steps to Reproduce

Create the following graphql query:

{
  ip_range_list(filters: {parent: {exact: "10.20.0.0/16"}}) {
    id
  }
}

Expected Behavior

I expect the same result as this API call:

/api/ipam/ip-ranges/?parent=10.20.0.0/16

And it is mentioned in this issue:

#13313

Also the IPRangeFilter graphql type has a parent: StrFilterLookup field.

Observed Behavior

Error is thrown:

{
  "data": null,
  "errors": [
    {
      "message": "Cannot resolve keyword 'parent' into field. Choices are: bookmarks, comments, contacts, created, custom_field_data, description, end_address, id, journal_entries, last_updated, mark_utilized, role, role_id, size, start_address, status, subscriptions, tagged_items, tags, tenant, tenant_id, vrf, vrf_id",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "ip_range_list"
      ]
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtopic: GraphQLtype: bugA confirmed report of unexpected behavior in the application

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions