Skip to content

GraphQL error "Expected value of type 'InterfaceType' but got: <VMInterface instance>." when querying interfaces from a VM #16124

@derdeagle

Description

@derdeagle

Deployment Type

Self-hosted

NetBox Version

v4.0.1

Python Version

3.11

Steps to Reproduce

  1. execute the following GraphQL query
{
  virtual_machine_list {
    name
    interfaces {
      mode
    }
  }
}

Expected Behavior

A valid resultset should be returned.

Observed Behavior

The following result containing the error message "Expected value of type 'InterfaceType' but got: ." is being returned.

{
  "data": null,
  "errors": [
    {
      "message": "Expected value of type 'InterfaceType' but got: <VMInterface instance>.",
      "locations": [
        {
          "line": 4,
          "column": 5
        }
      ],
      "path": [
        "virtual_machine_list",
        0,
        "interfaces",
        0
      ]
    }
  ]
}

This can be reproduced on the NetBox demo page.

I updated from 3.7.8 (where it worked as intended) to 4.0.1.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions