[PR #20626] [MERGED] Fixes #20422: Allow Aggregate and Prefix to filter by family in GraphQL #15989

Closed
opened 2025-12-30 00:25:11 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20626
Author: @rinna11
Created: 10/20/2025
Status: Merged
Merged: 10/27/2025
Merged by: @jnovinger

Base: mainHead: 20422-fix-family-filter


📝 Commits (2)

  • 71581e8 Fixes #20422: Allow AggregateFilter and PrefixFilter to filter by family in GraphQL
  • 8ed57eb Add missing decorator to AggregateFilter.family()

📊 Changes

1 file changed (+16 additions, -0 deletions)

View changed files

📝 netbox/ipam/graphql/filters.py (+16 -0)

📄 Description

Fixes: #20422

This allows AggregateFilter and PrefixFilter to filter by their family similar with IPAddressFilter.
I've tested the following queries manually:

aggregate_v6: aggregate_list(filters: {family: FAMILY_6}) {
    prefix
}
prefixes_v4: prefix_list(filters: {family: FAMILY_4}) {
    prefix
    role {
      name
    }
    vrf {
      name
    }
    vlan {
      vid
    }
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20626 **Author:** [@rinna11](https://github.com/rinna11) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/27/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `20422-fix-family-filter` --- ### 📝 Commits (2) - [`71581e8`](https://github.com/netbox-community/netbox/commit/71581e8950f07a1d8b7e979401d71a1193dc0fa9) Fixes #20422: Allow AggregateFilter and PrefixFilter to filter by family in GraphQL - [`8ed57eb`](https://github.com/netbox-community/netbox/commit/8ed57ebdb73a141648e35f98244d33c4fecccc90) Add missing decorator to AggregateFilter.family() ### 📊 Changes **1 file changed** (+16 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/graphql/filters.py` (+16 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #20422 This allows `AggregateFilter` and `PrefixFilter` to filter by their family similar with `IPAddressFilter`. I've tested the following queries manually: ```graphql aggregate_v6: aggregate_list(filters: {family: FAMILY_6}) { prefix } prefixes_v4: prefix_list(filters: {family: FAMILY_4}) { prefix role { name } vrf { name } vlan { vid } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:25:11 +01:00
adam closed this issue 2025-12-30 00:25:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15989