GraphQL: - GraphQL not showing ALL connected cables #10800

Closed
opened 2025-12-29 21:36:03 +01:00 by adam · 2 comments
Owner

Originally created by @cruse1977 on GitHub (Feb 24, 2025).

Deployment Type

NetBox Cloud

NetBox Version

v4.2.4

Python Version

3.10

Steps to Reproduce

I've use demo.netbox.dev as an example however this is fairly easy to replicate in any instance:

  1. create a device with some interfaces
  2. connect a cable between 2 of the interfaces on the same device (note: where you connect the cables is irrelevant, this is just for speed).
  3. Run the following graphql query replacing "device_name" with the name of the device to show interfaces and cables from a specific device
{
  device_list(filters: {name: {in_list: ["device name"]}}) {
    id
    name
    platform {
      slug
    }
    site {
      slug
    }
    interfaces {
      name
      cable {
        id
      }
    }
  }
}

this can be replicated on demo.netbox.dev using dmi01-buffalo-sw01 and creating a cable between Gi1/0/3 and Gi1/0/4 as an example.

Expected Behavior

Cables connected to interfaces are shown.

Observed Behavior

Only certain (older) cables are shown.

Example from demo.netbox.dev - whereas I have connected a cable between ports Gi0/0/3 and Gi0/0/4 of dmi-buffalo-sw01 as per the above.

Image

However graphQL does not reflect this:

Image

NOTE: API data returns correct results - this is specific to graphql.

Originally created by @cruse1977 on GitHub (Feb 24, 2025). ### Deployment Type NetBox Cloud ### NetBox Version v4.2.4 ### Python Version 3.10 ### Steps to Reproduce I've use demo.netbox.dev as an example however this is fairly easy to replicate in any instance: 1. create a device with some interfaces 2. connect a cable between 2 of the interfaces on the same device (note: where you connect the cables is irrelevant, this is just for speed). 3. Run the following graphql query replacing "device_name" with the name of the device to show interfaces and cables from a specific device ``` { device_list(filters: {name: {in_list: ["device name"]}}) { id name platform { slug } site { slug } interfaces { name cable { id } } } } ``` this can be replicated on demo.netbox.dev using dmi01-buffalo-sw01 and creating a cable between Gi1/0/3 and Gi1/0/4 as an example. ### Expected Behavior Cables connected to interfaces are shown. ### Observed Behavior Only certain (older) cables are shown. Example from demo.netbox.dev - whereas I have connected a cable between ports Gi0/0/3 and Gi0/0/4 of dmi-buffalo-sw01 as per the above. <img width="1550" alt="Image" src="https://github.com/user-attachments/assets/7daec71f-9c6f-4de8-bb35-737eebed8c27" /> However graphQL does not reflect this: <img width="1813" alt="Image" src="https://github.com/user-attachments/assets/93fe1db8-56c4-45f0-8a8e-9d871f80a6a0" /> NOTE: API data returns correct results - this is specific to graphql.
adam added the type: bugtopic: GraphQLseverity: low labels 2025-12-29 21:36:03 +01:00
adam closed this issue 2025-12-29 21:36:03 +01:00
Author
Owner

@jnovinger commented on GitHub (Mar 27, 2025):

@cruse1977 , I can't reproduce this anymore, either locally or on demo.netbox.dev. I've also not been able to track down when this might have been fixed. 😕

Can you confirm it's still happening for you?

Image

@jnovinger commented on GitHub (Mar 27, 2025): @cruse1977 , I can't reproduce this anymore, either locally or on demo.netbox.dev. I've also not been able to track down when this might have been fixed. 😕 Can you confirm it's still happening for you? ![Image](https://github.com/user-attachments/assets/e9c6fe82-3fe3-45f1-aa82-fd35c6f92c35)
Author
Owner

@arthanson commented on GitHub (Apr 22, 2025):

This looks like it was fixed, no longer reproducible. Closing. @cruse1977 please re-open if you find a scenario where it is appearing but this reproduction seems fixed.

@arthanson commented on GitHub (Apr 22, 2025): This looks like it was fixed, no longer reproducible. Closing. @cruse1977 please re-open if you find a scenario where it is appearing but this reproduction seems fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10800