Skip to content

GraphQL DjangoModelType only has pk attribute #17710

Closed
@SRF-oberlicy

Description

@SRF-oberlicy

Deployment Type

Self-hosted

NetBox Version

v4.1.1

Python Version

3.11

Steps to Reproduce

When querying cables and their terminations, i cannot get the device name of the terminating interface anymore (since NB v4 / strawberry GraphQL)

Example query:

query {
  virtual_chassis_list {
    name
    members {
      name
      uplink_interfaces: interfaces {
        name
        cable {
          terminations {
            display
            _device {
              pk
            }
          }
        }
      }
    }
  }
}

Expected Behavior

In Netbox 3.7 we were able to query for the parent device of the termination, therefore I would expect have the same or a similar behaviour. Since the pk is available, the name shouldn't be too far away.

Observed Behavior

The DjangoModelType (in this case the _device) only has a pk attribute which provides the ID of the device.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtopic: GraphQLtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions