Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphql error returned when querying IP addresses and returning assigned_object in v4.0-beta1 #15809

Closed
atownson opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@atownson
Copy link
Contributor

Deployment Type

Self-hosted

NetBox Version

v4.0-beta1

Python Version

3.10

Steps to Reproduce

Run the following query against the Strawberry Graphql endpoint:

{
  ip_address_list {
    id
    assigned_object {
      __typename
      ... on InterfaceType {
        id
        name
        device {
          name
        }
      }
      ... on FHRPGroupType {
        id
        name
      }
      ... on VMInterfaceType {
        id
        name
      }
    }
  }
}

Expected Behavior

The expected results are returned:

{
  "data": {
    "ip_address_list": [
      {
        "id": "1",
        "assigned_object": {
          "__typename": "InterfaceType",
          "id": "1",
          "name": "GigabitEthernet0/0/0",
          "device": {
            "name": "test"
          }
        }
      },
      {
        "id": "2",
        "assigned_object": null
      }
    ]
  }
}

Observed Behavior

An error response is returned:

{
  "data": null,
  "errors": [
    {
      "message": "Cannot return null for non-nullable field IPAddressType.assigned_object.",
      "locations": [
        {
          "line": 4,
          "column": 5
        }
      ],
      "path": [
        "ip_address_list",
        2,
        "assigned_object"
      ]
    }
  ]
}
@atownson atownson added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Apr 22, 2024
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Apr 22, 2024
@arthanson arthanson removed their assignment Apr 22, 2024
@arthanson arthanson added severity: medium Results in substantial degraded or broken functionality for specfic workflows and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 22, 2024
@arthanson arthanson self-assigned this Apr 23, 2024
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Apr 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants