Returns list with join between tables done or returns raw table and use parent to do another query? #7083
Replies: 1 comment
-
The example here isn't quite correct - in [2] you have a As your schema scales, fetching all possible data that a user might have will become problematic. For that reason, you generally only want to resolve fields as needed. Note that resolving users and then each user's posts individually can be problematic as well! This is a commonly encountered problem (named N+1, since you have your first query followed by N queries for posts where N is the number of users you got in the first query). I recommend looking into DataLoader and searching for information on "GraphQL N+1" if you're not already familiar with the topic. |
Beta Was this translation helpful? Give feedback.
-
Returns list with join between tables done or returns raw table and use id field (parent) to do another query? e.g:
[1]
or
[2]
ref: https://twitter.com/ggabrieo/status/1585319686245584896
Beta Was this translation helpful? Give feedback.
All reactions