Is there a way to filter by custom fields in graphql queries? #7569
Unanswered
emil-nasso
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think you're right. Although the documentation says "The GraphQL API employs the same filtering logic as the UI and REST API", filters like Probably worth raising as a feature request, or (if rejected) as a documentation update. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to filter tenants (in the
tenant_list
-query) using a custom field.In the REST-api, I can use this: https://netbox.readthedocs.io/en/stable/rest-api/filtering/#filtering-by-custom-field
I can't seem to find anything similar in the graphql-api.
The
tenant_list
query has aq: String
argument though, not sure if I can input a custom filter there, somehow.In this comment, there is mention that a solution is still needed for custom fields. #2007 (comment)
Maybe custom fields are simply not supported (yet?) when filtering?
Beta Was this translation helpful? Give feedback.
All reactions