Add dataloaders to our GraphQL resolvers to improve batching and performance, especially for fields that repeatedly load users or recipes in loops.
Start with the resolvers defined in:
Good candidates include fields that resolve related users, recipes, revisions, ingredients, and steps, as seen in the GraphQL schema files:
Prioritize places where N+1 queries are likely, such as:
Recipe.author
RecipeRevision.recipe
RecipeRevision.ingredients
RecipeRevision.steps
User.recipes
See gqlgen dataloader docs: https://gqlgen.com/reference/dataloaders/
Add dataloaders to our GraphQL resolvers to improve batching and performance, especially for fields that repeatedly load users or recipes in loops.
Start with the resolvers defined in:
Good candidates include fields that resolve related users, recipes, revisions, ingredients, and steps, as seen in the GraphQL schema files:
Prioritize places where N+1 queries are likely, such as:
Recipe.authorRecipeRevision.recipeRecipeRevision.ingredientsRecipeRevision.stepsUser.recipesSee gqlgen dataloader docs: https://gqlgen.com/reference/dataloaders/