Extend GraphQL FHRPGroupType with ip_addresses #9100

Closed
opened 2025-12-29 20:45:27 +01:00 by adam · 0 comments
Owner

Originally created by @Leo1003 on GitHub (Jan 17, 2024).

Originally assigned to: @Leo1003 on GitHub.

NetBox version

v3.5.9

Feature type

Change to existing functionality

Proposed functionality

There is no way to get IP addresses directly in FHRPGroupType (even in the latest version). I have to make another query to get the information.

query {
  fhrp_ips: ip_address_list(fhrpgroup_id: "1234") {
    address
  }
}

However, the underlying model has the ip_addresses field which is its relation to IPAddress and the REST API can retrieve this field.

I think FHRPGroupType is just missing IPAddressesMixin ?

Use case

With this feature, one can use simple GraphQL query to get IP addresses bind to a FHRPGroup

query {
  fhrp_group(id: 1234) {
    ip_addresses {
      address
    }
  }
}

Or, directly access in the response

query {
  fhrp_group_assignment_list(device_id: "123") {
    group {
      id
      ip_addresses {
        address
      }
    }
  }
}

Database changes

No. The FHRPGroup model already has ip_addresses relation.

External dependencies

No response

Originally created by @Leo1003 on GitHub (Jan 17, 2024). Originally assigned to: @Leo1003 on GitHub. ### NetBox version v3.5.9 ### Feature type Change to existing functionality ### Proposed functionality There is no way to get IP addresses directly in `FHRPGroupType` (even in the latest version). I have to make another query to get the information. ```graphql query { fhrp_ips: ip_address_list(fhrpgroup_id: "1234") { address } } ``` However, the underlying model has the `ip_addresses` field which is its relation to `IPAddress` and the REST API can retrieve this field. I think `FHRPGroupType` is just missing `IPAddressesMixin` ? ### Use case With this feature, one can use simple GraphQL query to get IP addresses bind to a FHRPGroup ```graphql query { fhrp_group(id: 1234) { ip_addresses { address } } } ``` Or, directly access in the response ```graphql query { fhrp_group_assignment_list(device_id: "123") { group { id ip_addresses { address } } } } ``` ### Database changes No. The `FHRPGroup` model already has ip_addresses relation. ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 20:45:27 +01:00
adam closed this issue 2025-12-29 20:45:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9100