Skip to content

Device-Filter for console_ports in GraphQL shows error #21512

@dxks

Description

@dxks

NetBox Edition

NetBox Community

NetBox Version

v4.5.3

Python Version

3.12

Steps to Reproduce

Create a simple GraphQL-Query filtering on console-ports (verified on demo.netbox.dev):

query {
  device_list(filters:{console_ports:{cable_end:{in_list:[SIDE_A, SIDE_B]}}}) {
    id
    name
  }
}

Expected Behavior

A list of devices with a connected console-port

Observed Behavior

An Error:

{
  "data": null,
  "errors": [
    {
      "message": "Cannot resolve keyword 'console_ports' into field. Choices are: airflow, asset_tag, bookmarks, cabletermination, cluster, cluster_id, comments, config_template, config_template_id, console_port_count, console_server_port_count, consoleports, consoleserverports, contacts, created, custom_field_data, description, device_bay_count, device_type, device_type_id, devicebays, face, front_port_count, frontports, id, images, interface_count, interfaces, inventory_item_count, inventoryitems, journal_entries, last_updated, latitude, local_context_data, location, location_id, longitude, module_bay_count, modulebays, modules, name, oob_ip, oob_ip_id, owner, owner_id, parent_bay, platform, platform_id, port_mappings, position, power_outlet_count, power_port_count, poweroutlets, powerports, primary_ip4, primary_ip4_id, primary_ip6, primary_ip6_id, rack, rack_id, rear_port_count, rearports, role, role_id, serial, services, site, site_id, status, subscriptions, tagged_items, tags, tenant, tenant_id, vc_master_for, vc_position, vc_priority, vdcs, virtual_chassis, virtual_chassis_id, virtual_machines",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "device_list"
      ]
    }
  ]
}

When using consoleports (as shown in the error):

{
  "data": null,
  "errors": [
    {
      "message": "Field 'consoleports' is not defined by type 'DeviceFilter'. Did you mean 'console_ports'?",
      "locations": [
        {
          "line": 2,
          "column": 24
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the application

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions