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

How many dataloaders do we need ? #27

Open
gotexis opened this issue Jun 25, 2019 · 1 comment
Open

How many dataloaders do we need ? #27

gotexis opened this issue Jun 25, 2019 · 1 comment

Comments

@gotexis
Copy link

gotexis commented Jun 25, 2019

Hey, do you create 1 loader for each type of entity and that's enough? no need for separate loaders for subqueries? So if you query

{Article (where: {id: 1})
    {
        Comments  { id }  
    }
}

, if you have a CommentLoader that will load as only 2 SQL calls?

Or do we need a CommentByArticleLoader to only be used with this query?

@benawad
Copy link
Owner

benawad commented Jun 25, 2019

You'll sometimes need to create separate loaders for subqueries

in this case I would do CommentByArticleLoader

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

2 participants