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
As a developer, I want to be able to define limitations on which model instances can be fetched by a DjangoFilterConnectionField even if queried indirectly as a reverse foreign key relation of another model.
Currently my filters only apply where I explicitly set them via DjangoFilterConnectionField -- not on related entry points.
I saw some code from stephrdev which would fix this. With the comment that it would probably not work as is in my repo.
stephrdev: Can you please point me to code again?
The text was updated successfully, but these errors were encountered:
To control the available model instances on a manager (no matter which direction) you can override the resolve_<[related] manager name> or replace the connection class of the object type.
To prevent related managers all around in the graph schema, it is always a good idea to use only_fields Meta option on DjangoObjectType to control which fields are exposed at all. You might not need all of the fields.
As a developer, I want to be able to define limitations on which model instances can be fetched by a
DjangoFilterConnectionField
even if queried indirectly as a reverse foreign key relation of another model.Currently my filters only apply where I explicitly set them via
DjangoFilterConnectionField
-- not on related entry points.I saw some code from stephrdev which would fix this. With the comment that it would probably not work as is in my repo.
stephrdev: Can you please point me to code again?
The text was updated successfully, but these errors were encountered: