Closed
Description
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.7
Python Version
3.11
Steps to Reproduce
Create a simple GraphQL query to get all cable-terminations of an device and retrieve the cable information:
{
device(id: 249) {
cabletermination_set {
cable {
display
}
}
}
}
You will retrieve the following error:
{
"data": null,
"errors": [
{
"message": "Cannot query field 'display' on type 'DjangoModelType'.",
"locations": [
{
"line": 2,
"column": 61
}
]
}
]
}
Expected Behavior
Retrieve the cable details on the cable-termination:
{
"data": {
"device": {
"cabletermination_set": [
{
"cable": {
"display": "#2452"
}
}
]
}
}
}
Observed Behavior
The cable of cabletermination_set is referencing ModelDjangoType instead of CableType. Querying the cable will only possible when querying the terminations and cable there.