-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering by id for MongoengineConnectionField returns edge with null #146
Comments
can you show your type class and resolver? |
|
you should either
Not sure if this belongs in the issues sections of this repo |
A custom resolver defeats the purpose of the The
Hope this helps someone in the future. I think it should be an issue as there are many instances where people want to resolve non-global ids and filter on them. |
yeah having a generic |
I've got both in mine actually! You're very correct! I tried filtering ids on an embedded document w/ a different field name. I've modified it to this to work generically:
Tested on embedded field + list of reference fields and seems to work. |
how does this work on EmbeddedDocuments when they dont have an objects property? |
You're right. This does not work on filtering EmbeddedDocuents. I needed to look at the last several records of an EmbeddedDocument, and it kept complaining about not having a I've tried it with both Not sure if I should create a separate issue for this? |
This is because graphene_mongo expects the pk property to be present on your models (for some reason), if your embedded document has a natural/surrogate key, then you can add an alias called
replacing |
Hello, is there any progress or suggestions in how to filter EmbeddedDocuments? I have been trying for a while now and I've stumbled upon this open issue for the same thing. |
I have changed a few lines in the
Right now, it works and have not ran into any issues while doing a few tests. |
When I try to filter by id using
MongoengineConnectionField
, using this query:The text was updated successfully, but these errors were encountered: