[PR #15577] [MERGED] 15574 Backport strawberry-graphql-django library #14618

Closed
opened 2025-12-29 23:25:32 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15577
Author: @arthanson
Created: 3/29/2024
Status: Merged
Merged: 3/29/2024
Merged by: @jeremystretch

Base: featureHead: 15574-graphql-filter


📝 Commits (3)

  • 463c32c 15574 backport strawberry-django
  • 36e30e4 Merge branch 'feature' into 15574-graphql-filter
  • 1db5c14 Restore strawberry-graphql version

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 requirements.txt (+1 -1)

📄 Description

Fixes: #15574

Strawberry PR https://github.com/strawberry-graphql/strawberry-django/pull/478 overhauled the filtering code and it causes major breakages with our autotype decorator, specifically these two in their release notes:

Custom filters can be defined using a method with the @strawberry_django.filter_field decorator: https://strawberry-graphql.github.io/strawberry-django/guide/filters/#custom-filter-methods
The default filter method can be overriden also by using a @strawberry_django.filter_field decorator: https://strawberry-graphql.github.io/strawberry-django/guide/filters/#overriding-the-default-filter-method

However it also seems to potentially have some bugs as for example on site_list if you add a filter for asn it excepts it in the GraphiQL browser editor, but in the output pane it says it's not a valid param and instead lists the params for the model type (not the filter) which is incorrect. Will have to investigate further post-beta.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15577 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 3/29/2024 **Status:** ✅ Merged **Merged:** 3/29/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15574-graphql-filter` --- ### 📝 Commits (3) - [`463c32c`](https://github.com/netbox-community/netbox/commit/463c32c7af684aef21675f10a960aadad0ab20a1) 15574 backport strawberry-django - [`36e30e4`](https://github.com/netbox-community/netbox/commit/36e30e44915f3df86c6ba0c592f9aab28cff8798) Merge branch 'feature' into 15574-graphql-filter - [`1db5c14`](https://github.com/netbox-community/netbox/commit/1db5c14d5ca600146e4bdff0fc77372b579c5834) Restore strawberry-graphql version ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `requirements.txt` (+1 -1) </details> ### 📄 Description ### Fixes: #15574 Strawberry PR https://github.com/strawberry-graphql/strawberry-django/pull/478 overhauled the filtering code and it causes major breakages with our autotype decorator, specifically these two in their release notes: Custom filters can be defined using a method with the @strawberry_django.filter_field decorator: https://strawberry-graphql.github.io/strawberry-django/guide/filters/#custom-filter-methods The default filter method can be overriden also by using a @strawberry_django.filter_field decorator: https://strawberry-graphql.github.io/strawberry-django/guide/filters/#overriding-the-default-filter-method However it also seems to potentially have some bugs as for example on site_list if you add a filter for asn it excepts it in the GraphiQL browser editor, but in the output pane it says it's not a valid param and instead lists the params for the model type (not the filter) which is incorrect. Will have to investigate further post-beta. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:32 +01:00
adam closed this issue 2025-12-29 23:25:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14618