Range-Lookup not working vor vc_position in GraphQL #11670

Open
opened 2025-12-29 21:48:19 +01:00 by adam · 0 comments
Owner

Originally created by @dxks on GitHub (Oct 2, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.4.2

Python Version

3.12

Steps to Reproduce

Send a simple query towards the graphql-endpoint:
query { device_list(filters:{vc_position:{range_lookup:{start:0, end:20}}}) { id name virtual_chassis { id name member_count } } }

Expected Behavior

As there is no longer a filter for Devices to check which one is member of a Virtual_chassis, nor the possibility to filter that virtual_chassis_id is not null we try to overcome this by filtering the vc_position that must be defined.

The result should be a list of devices that have a vc_position assigned and therefore belongs to a virtual_chassis.

Observed Behavior

The following error raised:
{ "data": null, "errors": [ { "message": "Field 'vc_position' expected a number but got [0, 20].", "locations": [ { "line": 2, "column": 3 } ], "path": [ "device_list" ] } ] }

the comparison lookup (even with ranges) and filter lookup works.

Originally created by @dxks on GitHub (Oct 2, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.4.2 ### Python Version 3.12 ### Steps to Reproduce Send a simple query towards the graphql-endpoint: `query { device_list(filters:{vc_position:{range_lookup:{start:0, end:20}}}) { id name virtual_chassis { id name member_count } } }` ### Expected Behavior As there is no longer a filter for Devices to check which one is member of a Virtual_chassis, nor the possibility to filter that virtual_chassis_id is not null we try to overcome this by filtering the vc_position that must be defined. The result should be a list of devices that have a vc_position assigned and therefore belongs to a virtual_chassis. ### Observed Behavior The following error raised: `{ "data": null, "errors": [ { "message": "Field 'vc_position' expected a number but got [0, 20].", "locations": [ { "line": 2, "column": 3 } ], "path": [ "device_list" ] } ] }` the comparison lookup (even with ranges) and filter lookup works.
adam added the type: bugstatus: needs ownernetboxtopic: GraphQLseverity: low labels 2025-12-29 21:48:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11670