Comments (3)
In this particular case, it appears that the devices.role
filter is filtering on the Device.device_role.slug
field and not the name
field:
To illustrate this, I attempted a filter on Backbone
and got the unfiltered results, which IMO is not the expected behavior if the filter parameter is incorrect. You'd think it would return no matches instead of all?
Query on Backbone
:
{
devices(role: "Backbone"){
id
name
device_role {
name
slug
}
}
}
Result (first item only):
{
"data": {
"devices": [
{
"id": "60833d08-7bdd-4b40-a8c4-33c1984ccc90",
"name": "ams-edge-01",
"device_role": {
"name": "edge",
"slug": "edge"
}
},
Then I did it with backbone
:
{
devices(role: "backbone"){
id
name
device_role {
name
slug
}
}
}
With this result, matching your expected results:
{
"data": {
"devices": [
{
"id": "7b871f65-d4d5-4ab5-8fd5-211a8e093976",
"name": "jcy-bb-01.infra.ntc.com",
"device_role": {
"name": "Backbone",
"slug": "backbone"
}
},
{
"id": "bfcd2323-5b32-4388-af61-05a7ed1404f7",
"name": "nyc-bb-01.infra.ntc.com",
"device_role": {
"name": "Backbone",
"slug": "backbone"
}
}
]
}
}
Can you please confirm?
from nautobot.
I can confirm the same.
If the filters are coming from here.
Upon further research based on your comment, it seems that this might be a known issue with MultipleChoice Filter where filtering is becoming a NOOP due to no choice being present (assuming incorrect filter choice == no filter). This is based on this documentation of the filter.
from nautobot.
Similar issue: https://stackoverflow.com/questions/60010190/how-to-stop-graphql-django-filters-to-return-all-objects-when-filter-string-is
from nautobot.
Related Issues (20)
- Inconsistent Advance Filter form lookup type value for `Has ...` fields.
- is_truthy() Pylint Error HOT 2
- Fix method resolution order for filtersets HOT 1
- IntegrityError when setting DeviceType software images to null via bulk edit HOT 1
- SAML issue in Nautobot 2.2.4 (lxml & xmlsec libxml2 library version mismatch) HOT 1
- API permits destination in one-to-many relationship to have multiple sources when multiple relationships are creating using a single extras.relationship_associations API call
- Device_redundancy_groups, bad data, and intended config HOT 1
- Config Context UI
- Cloud Network Model
- JSON Schema model for cloud
- Copy of JSON Schema model for cloud
- Cloud Account model
- Add ability to search on interface description globally HOT 1
- CloudType model
- Documentation Update: Main Overview Page
- Create a common helper function for saved view related functions
- Base NautobotHTMLRenderer on rest_framework.renderers.TemplateHTMLRenderer
- Modules UI to adopt existing device components
- Going back to list view from detail view takes multiple clicks
- Unit test failures under Celery 5.4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nautobot.