NB 4 GraphQL Queries on related objects broken #9406

Closed
opened 2025-12-29 20:49:24 +01:00 by adam · 0 comments
Owner

Originally created by @arthanson on GitHub (Mar 28, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.0.0

Python Version

3.8

Steps to Reproduce

The NB3 equivalent of:

{
  site_list(region: "us-nc") {
    name
    region {
      name
      slug
    }
  }
}

The NB4 (strawberry) equivalent of this should be:

{
  site_list(filters : {region: "us-nc"}) {
    name
    region {
      name
      slug
    }
  }
}

This should work, single-field items like status work fine.

Expected Behavior

GraphQL query should return results and not error

Observed Behavior

If you enter in a string it will error with:

"Field 'id' expected a number but got ['us-nc']."

Originally created by @arthanson on GitHub (Mar 28, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.0.0 ### Python Version 3.8 ### Steps to Reproduce The NB3 equivalent of: ``` { site_list(region: "us-nc") { name region { name slug } } } ``` The NB4 (strawberry) equivalent of this should be: ``` { site_list(filters : {region: "us-nc"}) { name region { name slug } } } ``` This should work, single-field items like status work fine. ### Expected Behavior GraphQL query should return results and not error ### Observed Behavior If you enter in a string it will error with: `"Field 'id' expected a number but got ['us-nc']."`
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 20:49:24 +01:00
adam closed this issue 2025-12-29 20:49:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9406