[GraphQL] Only one primary IP is shown when querying #10618

Closed
opened 2025-12-29 21:33:47 +01:00 by adam · 5 comments
Owner

Originally created by @freym on GitHub (Jan 7, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.2.0

Python Version

3.12

Steps to Reproduce

  1. Create multiple Devices and assign different IPs to this devices.
  2. Mark these IPs as primary for the device.
  3. Run this GraphQL query:
{
  device_list {
    primary_ip4 {
      id
      display
    }
  }
}

Expected Behavior

A list with all primary IPs should be displayed

Observed Behavior

Only the first primary IP is displayed. All other IPs are NULL.

Example:
IPs:

  • 192.168.1.1
  • 192.168.1.2
  • 192.168.1.3

Only 192.168.1.1 is displayed, when you unmark this IP, 192.168.1.2 is displayed when running the query.

Originally created by @freym on GitHub (Jan 7, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.2.0 ### Python Version 3.12 ### Steps to Reproduce 1. Create multiple Devices and assign different IPs to this devices. 2. Mark these IPs as primary for the device. 3. Run this GraphQL query: ``` { device_list { primary_ip4 { id display } } } ``` ### Expected Behavior A list with all primary IPs should be displayed ### Observed Behavior Only the first primary IP is displayed. All other IPs are NULL. Example: IPs: - 192.168.1.1 - 192.168.1.2 - 192.168.1.3 Only 192.168.1.1 is displayed, when you unmark this IP, 192.168.1.2 is displayed when running the query.
adam added the type: bugstatus: acceptedtopic: GraphQLseverity: medium labels 2025-12-29 21:33:47 +01:00
adam closed this issue 2025-12-29 21:33:47 +01:00
Author
Owner

@freym commented on GitHub (Jan 8, 2025):

I had some time to take a closer look. This behavior has been occurring since v4.1.11.
There strawberry-graphql and strawberry-graphql-django packages were updated in v4.1.11. Is it possibly related to this?

@freym commented on GitHub (Jan 8, 2025): I had some time to take a closer look. This behavior has been occurring since v4.1.11. There strawberry-graphql and strawberry-graphql-django packages were updated in v4.1.11. Is it possibly related to this?
Author
Owner

@jeremystretch commented on GitHub (Jan 8, 2025):

There strawberry-graphql and strawberry-graphql-django packages were updated in v4.1.11. Is it possibly related to this?

Sure looks like it. I can confirm that the bug not reproducible with strawberry-graphql-django v0.52.0 installed. It appears that something broke in the v0.52.1 release.

I'm going to pin NetBox to v0.52.0 for now. This will likely need to be pursued upstream.

Thanks for digging into this @freym!

@jeremystretch commented on GitHub (Jan 8, 2025): > There strawberry-graphql and strawberry-graphql-django packages were updated in v4.1.11. Is it possibly related to this? Sure looks like it. I can confirm that the bug not reproducible with `strawberry-graphql-django` v0.52.0 installed. It appears that something broke in the [v0.52.1 release](https://github.com/strawberry-graphql/strawberry-django/releases/tag/v0.52.1). I'm going to pin NetBox to v0.52.0 for now. This will likely need to be pursued upstream. Thanks for digging into this @freym!
Author
Owner

@tyler-8 commented on GitHub (Feb 6, 2025):

I know this issue is closed but I want to document my finding here for anyone else that may run into it: If you're still on v4.1.11, this issue also seems to affect other nested fields. For example, the termination_a field on a circuit_list query. The field will be null except for the first circuit in the list.

@tyler-8 commented on GitHub (Feb 6, 2025): I know this issue is closed but I want to document my finding here for anyone else that may run into it: If you're still on v4.1.11, this issue also seems to affect other nested fields. For example, the `termination_a` field on a `circuit_list` query. The field will be `null` except for the first circuit in the list.
Author
Owner

@jeremystretch commented on GitHub (Apr 14, 2025):

The upstream bug appears to have been fixed in strawberry-graphql-django v0.57.1.

@jeremystretch commented on GitHub (Apr 14, 2025): The upstream bug appears to have been fixed in strawberry-graphql-django v0.57.1.
Author
Owner

@xocoru commented on GitHub (Apr 16, 2025):

still null on 4.2.6

@xocoru commented on GitHub (Apr 16, 2025): still null on 4.2.6
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10618