Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #7598: Enable custom field filtering for GraphQL #18701

Open
wants to merge 7 commits into
base: feature
Choose a base branch
from

Conversation

jeremystretch
Copy link
Member

@jeremystretch jeremystretch commented Feb 21, 2025

Closes: #7598

This PR serves to capture @jeremypng's recent work on improving the GraphQL API. Although this work primarily targets FR #7598, it includes many foundational improvements:

  • Discontinuing the use of deprecated filters (USE_DEPRECATED_FILTERS = False)
  • Defining standalone filters for GraphQL
  • Reusable mixin classes for filters
  • Adds the as_enum() method to ChoiceSet for use in GraphQL filters

jeremypng and others added 6 commits February 19, 2025 10:11
* Add as_num() method to ChoiceSet

* Update circuits enums

* Update DCIM enums

* Update extras enums

* Update IPAM enums

* Add tenancy enums

* Update virtualization enums

* Update VPN enums

* Update wireless enums

* Update netbox enums

* Permit TenantType.group to be null
@jeremystretch jeremystretch added this to the v4.3 milestone Feb 21, 2025
@jeremystretch
Copy link
Member Author

We still need to update the documentation to cover:

  • The new filtering syntax for GraphQL queries
  • Developer instructions for adding & updating GraphQL filters

@jeremystretch
Copy link
Member Author

@jeremypng
Copy link

jeremypng commented Feb 27, 2025

We have continued using this graphql filtering system on 4.0.11 and have reduced nested queries that were taking 36s with pynetbox and the DRF API to 400ms with graphql.

The additional changes you have made look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants