Skip to content

GraphQL: Support for filtering on custom fields #7598

Closed
@emil-nasso

Description

@emil-nasso

NetBox version

v3.0.3

Feature type

New functionality

Proposed functionality

There doesn't seem to be a way to filter based on custom fields in the GraphQL-api.

The documentation mentions "The GraphQL API employs the same filtering logic as the UI and REST API" so one approach would be to just follow the same pattern where cf_foo_bar etc are exposed as arguments for the list query of an entity where foo_bar is a custom field.

(Reference to discussion about this: #7569 )

Use case

We have the use for this when listing tenants via the graphql API. We put the customers name in the name field but we have a custom field where we have an internal identifier that is used as a reference when linking the data in netbox up with other systems though integrations.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Labels

complexity: highExpected to require a large amont of time and effort to implement relative to other tasksnetboxstatus: acceptedThis issue has been accepted for implementationtopic: GraphQLtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions