-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
Deployment Type
Self-hosted
NetBox Version
v4.3.7
Python Version
3.12
Steps to Reproduce
- Create a site with any name (ie: Atlanta)
- Create a config context with any data and assign it to the site from step 1.
- Make a GraphQL API call with this query:
query contextList {
config_context_list(filters: {sites:{name:{in_list:["Atlanta"]}}}) {
name
data
}
}
Expected Behavior
The query returns the configuration context matching the site assignments in the filter.
Observed Behavior
The GraphQL API returns the following output:
{
"data": null,
"errors": [
{
"message": "Field 'ConfigContextFilter.name' of required type 'StrFilterLookup!' was not provided.",
"locations": [
{
"line": 2,
"column": 32
}
]
},
{
"message": "Field 'ConfigContextFilter.description' of required type 'StrFilterLookup!' was not provided.",
"locations": [
{
"line": 2,
"column": 32
}
]
},
{
"message": "Field 'ConfigContextFilter.is_active' of required type 'BoolFilterLookup!' was not provided.",
"locations": [
{
"line": 2,
"column": 32
}
]
}
]
}
The issue stems from extras/graphql/filters.py and the three fields name, is_active, description
not having a union operator with None
.
name: FilterLookup[str] = strawberry_django.filter_field()
description: FilterLookup[str] = strawberry_django.filter_field()
is_active: FilterLookup[bool] = strawberry_django.filter_field()
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application