Skip to content

GraphQL: Required fields that probably shouldn't be #16078

@joskin-nimar

Description

@joskin-nimar

Deployment Type

Self-hosted

NetBox Version

v4.0.1

Python Version

3.11

Steps to Reproduce

  1. Go to GraphQL console
  2. Enter this query
query {
  ip_address_list(filters: {tenant: "my-tenant"}){
    address
  }
}
  1. You'll have an error that some required fields are missing

Expected Behavior

The family, mask_length__gte and mask_length__lte filters shouldn't be mandatory.

Probably the same for other filters.
Also broken on https://demo.netbox.dev/

Observed Behavior

{
  "data": null,
  "errors": [
    {
      "message": "Field 'IPAddressFilter.family' of required type 'Int!' was not provided.",
      "locations": [
        {
          "line": 2,
          "column": 28
        }
      ]
    },
    {
      "message": "Field 'IPAddressFilter.mask_length__gte' of required type 'Int!' was not provided.",
      "locations": [
        {
          "line": 2,
          "column": 28
        }
      ]
    },
    {
      "message": "Field 'IPAddressFilter.mask_length__lte' of required type 'Int!' was not provided.",
      "locations": [
        {
          "line": 2,
          "column": 28
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availableseverity: mediumResults in substantial degraded or broken functionality for specfic workflowstopic: GraphQLtype: 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