You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying out querying data on the playground, I could not get the excepted result. For example, I chose Course model on the playground and tried to query by book ID, like this: { id, name, code, books(id:3) { id, title, author, genre { id, title, description } } }
It returns all courses. But if I try to query by course id, like this: (id:1) { id, name, code, books { id, title, author, genre { id, title, description } } }
It works as excepted. Tried it out on some of the offered models, but I could not get consistent result...sometimes it works as excepted, and in some cases (like this one) it does not. How does this exactly work?
The text was updated successfully, but these errors were encountered:
The behavior in the first query happens because books is a many-to-many field. However, it's quite unlikely that the issue lies with django-restql as django-restql simply propagates the filtering responsibility to the django filtering backend. It would depend on how the the filters for the many-to-many field were defined (if any) and which backend was used.
While trying out querying data on the playground, I could not get the excepted result. For example, I chose Course model on the playground and tried to query by book ID, like this:
{ id, name, code, books(id:3) { id, title, author, genre { id, title, description } } }
It returns all courses. But if I try to query by course id, like this:
(id:1) { id, name, code, books { id, title, author, genre { id, title, description } } }
It works as excepted. Tried it out on some of the offered models, but I could not get consistent result...sometimes it works as excepted, and in some cases (like this one) it does not. How does this exactly work?
The text was updated successfully, but these errors were encountered: