Skip to content
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

Multiple joins skip relations (data missing) #57

Open
jor3l opened this issue Sep 5, 2021 · 5 comments
Open

Multiple joins skip relations (data missing) #57

jor3l opened this issue Sep 5, 2021 · 5 comments

Comments

@jor3l
Copy link

jor3l commented Sep 5, 2021

Query without joins runs fine (super slow tho, hundreds of queries run sequentially):
image
And with a join it simply ignores that find for some reason and ends up not returning data for that node:
image

Note that the first join at the category level is working as expected, a single query returns all the categories + products. I wan't the same for all the product options in a product but it just works by running 1:N queries. Any idea what I'm doing wrong?

@jor3l
Copy link
Author

jor3l commented Sep 5, 2021

Enabling dataloader actually helped A LOT without using joins

@alirizwan
Copy link
Collaborator

I would not recommend using joins unless it's necessary. Joins will make query slow since it uses include option from sequelize. If you don't use joins, dataloader will kick in and will only run N+1 queries.

If you could explain what you are trying to achieve here, I will be able to suggest a solution.

@lewismclennan
Copy link

lewismclennan commented Jan 28, 2022

Hi @alirizwan, To come back to this I've had some similar issues where the joins are taking forever, So like @jor3l I've enabled the dataloader but noticed there are some issues around joins with null values. It significantly increased performance once enabled but some queries don't work. An example of an issue i'm getting is in the screenshot below.

devIssues

I don't know if this is similarly related to another issue other libraries have had previously around dataloaders and getting back the same error. For example

aerogear/graphback#1859

Happy to have a call to discuss if anything's unclear or if you need more detail.

Thanks,

Lewis

@alirizwan
Copy link
Collaborator

Hi @alirizwan, To come back to this I've had some similar issues where the joins are taking forever, So like @jor3l I've enabled the dataloader but noticed there are some issues around joins with null values. It significantly increased performance once enabled but some queries don't work. An example of an issue i'm getting is in the screenshot below.

devIssues

I don't know if this is similarly related to another issue other libraries have had previously around dataloaders and getting back the same error. For example

aerogear/graphback#1859

Happy to have a call to discuss if anything's unclear or if you need more detail.

Thanks,

Lewis

I think a call would be great. Let's discuss it and perhaps find a solution together :)

@lewismclennan
Copy link

lewismclennan commented Jan 31, 2022

@alirizwan - I've just emailed you to setup a call 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants