Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.4
Python Version
3.11
Steps to Reproduce
- execute the following query in the GraphiQL web interface. It should work.
- run the query below as a curl command. This will return an error.
GraphiQL:
{
border_leaf_list: device_list(
filters: {tag: "avd", virtual_chassis_member: false, status: "active", role: "border-leaf", site: "iplab"}
) {
name
loopback_interfaces: interfaces(filters: {type: {exact: "virtual"}}) {
name
description
type
ip_addresses {
address
vrf {
name
}
}
}
svi_interfaces: interfaces(filters: {type: {exact: "bridge"}}) {
name
description
type
ip_addresses {
address
}
}
}
}
CLI:
curl -H "Authorization: Token YOURTOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
https://YOURURL/graphql/ \
--data '{"query": "query {border_leaf_list: device_list(filters: {tag: \"avd\", virtual_chassis_member: false, status: \"active\", role: \"border-leaf\", site: \"iplab\"}) {name loopback_interfaces: interfaces(filters: {type: {exact: \"virtual\"}}) {name description type ip_addresses {address vrf {name}}} svi_interfaces: interfaces(filters: {type: {exact: \"bridge\"}}) {name description type ip_addresses {address}}}}"}'
Expected Behavior
The query should return this.
{
"data": {
"border_leaf_list": [
{
"name": "ZHFER-SCB9211-A",
"svi_interfaces": []
},
{
"name": "ZHFER-SCB9211-B",
"svi_interfaces": []
}
]
}
}
Observed Behavior
The curl command returns this insted.
{"data": null, "errors": [{"message": "Tried to prefetch 2 queries with different filters to the same attribute. Use `to_attr` in this case...", "locations": [{"line": 1, "column": 8}], "path": ["border_leaf_list"]}]}
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.4
Python Version
3.11
Steps to Reproduce
GraphiQL:
{ border_leaf_list: device_list( filters: {tag: "avd", virtual_chassis_member: false, status: "active", role: "border-leaf", site: "iplab"} ) { name loopback_interfaces: interfaces(filters: {type: {exact: "virtual"}}) { name description type ip_addresses { address vrf { name } } } svi_interfaces: interfaces(filters: {type: {exact: "bridge"}}) { name description type ip_addresses { address } } } }CLI:
Expected Behavior
The query should return this.
{ "data": { "border_leaf_list": [ { "name": "ZHFER-SCB9211-A", "svi_interfaces": [] }, { "name": "ZHFER-SCB9211-B", "svi_interfaces": [] } ] } }Observed Behavior
The curl command returns this insted.
{"data": null, "errors": [{"message": "Tried to prefetch 2 queries with different filters to the same attribute. Use `to_attr` in this case...", "locations": [{"line": 1, "column": 8}], "path": ["border_leaf_list"]}]}