[PR #19621] [MERGED] Allow filtering IP addresses by family in GraphQL #15683

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19621
Author: @mraerino
Created: 6/1/2025
Status: Merged
Merged: 6/3/2025
Merged by: @jnovinger

Base: mainHead: fix-graphql-family-filter


📝 Commits (1)

  • abca385 Allow filtering IP addresses by family in GraphQL

📊 Changes

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

View changed files

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

📄 Description

Fixes: #19605

This adds (back) the ability to filter IP addresses by their family, similar to how the REST API or list filtering capabilities in Netbox.

I've tested two queries manually:

query simple {
  ip_address_list(filters: {family: FAMILY_6}) {
    address
    family {
      label
    }
  }
}

query complex {
  device_list(filters: {interfaces: {ip_addresses: {family: FAMILY_6}}}) {
    interfaces {
      ip_addresses {
        address
        family {
          label
        }
      }
    }
  }
}

🔄 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/19621 **Author:** [@mraerino](https://github.com/mraerino) **Created:** 6/1/2025 **Status:** ✅ Merged **Merged:** 6/3/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `fix-graphql-family-filter` --- ### 📝 Commits (1) - [`abca385`](https://github.com/netbox-community/netbox/commit/abca385a27b0500bf5ecba864233904c48e6c57a) Allow filtering IP addresses by family in GraphQL ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/graphql/filters.py` (+8 -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: #19605 <!-- Please include a summary of the proposed changes below. --> This adds (back) the ability to filter IP addresses by their family, similar to how the REST API or list filtering capabilities in Netbox. I've tested two queries manually: ```gql query simple { ip_address_list(filters: {family: FAMILY_6}) { address family { label } } } query complex { device_list(filters: {interfaces: {ip_addresses: {family: FAMILY_6}}}) { interfaces { ip_addresses { address family { label } } } } } ``` --- <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:23:23 +01:00
adam closed this issue 2025-12-30 00:23:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15683