-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Not all items in a relationship are loaded #2
Comments
I'm 90% sure the bug here is When you set uselist to False, you're saying that there is only one value for "tasks". By doing it in both directions, you've configured this as a one-to-one relationship, when it really should be one to many (or many to one, I can never remember sqlalchemy's convention there). |
yasoob, would you be willing to give some more details on the Mapper section? I am just starting out with this package and am also using SQLAlchemy. Currently, I can get queries without traversing relationships to work, but when I attempt to do so I get a threading error: "There is no current event loop in thread 'Thread-1'". I haven't been able to find the extension you are using. Any help is appreciated, thanks! |
Hey @CDTiernan I haven't worked on this almost since I created the issue. I think @raguiar2 would be a better person to help on this :) |
Hey @CDTiernan, are you using this on Flask w/o async? The package currently assumes an async context for the dataloader, which is probably why you're receiving that error |
Yup this was my issue-- although I am using Django. Switching from Thanks for the help! |
Hi 👋
I really like what you have here. However, when I was trying to use it I came across some issues. Primarily, not all items in a relationship are being returned.
Minimal Example
Here is a minimal example:
1. Tables
2. Mapper
3. Queries
My database contains this data:
Issue
Now when I query using GraphQl, this is the output:
Query:
Result:
I would have expected all 4 tasks would show up in the nested tasks object. I am very new to GraphQL and not a 100% sure if this is an issue with my query or it is an issue in your wrapper.
The text was updated successfully, but these errors were encountered: