benawad / benawad/fullstack-graphql-airbnb-clone

How many dataloaders do we need ?

Open
#27 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.7k
Forks
444
PR merge metrics
No merged PRs in 30d

Description

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
```GQL
{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?

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named; start by locating the project's GraphQL loader setup and its handling of nested Article and Comments queries. The issue needs a maintainer decision on loader granularity and expected SQL calls, with the agreed behavior documented or implemented as the definition of done.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, nodejs, typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.