GraphQL filter 'in_list' for 'id' for interface_list #11883

Closed
opened 2025-12-29 21:51:12 +01:00 by adam · 1 comment
Owner

Originally created by @boehmgui on GitHub (Nov 28, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.4.5

Python Version

3.11

Steps to Reproduce

We upgraded form v4.1.7 to v4.4.5 and found that the following graphql query stopped working because the filter in_list for interface_list is not supported anymore

query interface_list_updated($id: [ID!]) {
  interface_list(filters: { id: { in_list: $id } }) {
    id
    name
    device {
      id
      name
    }
  }
}
params:
{"id": ["3385", "3386"]}

Can that filter please be re-added?

Expected Behavior

It is expected that the query returns a list of interfaces matching the ids in the params list, like:

{
  "data": {
    "interface_list": [
      {
        "id": "3385",
        "name": "Ethernet1/2",
        "device": {
          "id": "67",
          "name": "abcdefg"
        }
      },
      {
        "id": "3386",
        "name": "Ethernet1/3",
        "device": {
          "id": "67",
          "name": "xyz"
        }
      }
]

Observed Behavior

The query throws an error:

{
  "data": null,
  "errors": [
    {
      "message": "ID cannot represent a non-string and non-integer value: {in_list: $id}",
      "locations": [
        {
          "line": 2,
          "column": 33
        }
      ]
    }
  ]
}
Originally created by @boehmgui on GitHub (Nov 28, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.4.5 ### Python Version 3.11 ### Steps to Reproduce We upgraded form v4.1.7 to v4.4.5 and found that the following graphql query stopped working because the filter ```in_list``` for interface_list is not supported anymore ``` query interface_list_updated($id: [ID!]) { interface_list(filters: { id: { in_list: $id } }) { id name device { id name } } } ``` ``` params: {"id": ["3385", "3386"]} ``` Can that filter please be re-added? ### Expected Behavior It is expected that the query returns a list of interfaces matching the ids in the params list, like: ``` { "data": { "interface_list": [ { "id": "3385", "name": "Ethernet1/2", "device": { "id": "67", "name": "abcdefg" } }, { "id": "3386", "name": "Ethernet1/3", "device": { "id": "67", "name": "xyz" } } ] ``` ### Observed Behavior The query throws an error: ``` { "data": null, "errors": [ { "message": "ID cannot represent a non-string and non-integer value: {in_list: $id}", "locations": [ { "line": 2, "column": 33 } ] } ] } ```
adam added the netbox label 2025-12-29 21:51:12 +01:00
adam closed this issue 2025-12-29 21:51:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 29, 2025):

This is being reimplemented in NetBox v4.5. Please see FR #19338.

@jeremystretch commented on GitHub (Nov 29, 2025): This is being reimplemented in NetBox v4.5. Please see FR #19338.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11883