Feature: Data loader integration
https://github.com/facebook/dataloader 1. Caching resolving the same data 2. Instead of normal resolving: ```ts @FieldResolver() author(@Root() recipe: Recipe) { return this.userRepository.findById(recipe.authorId); } ``` Introduce batched resolving - taking array of roots: ```ts @FieldResolver() async author(@Root() recipes: Recipe[]) { const ids = recipes.map(r => r.authorId); return this.userRepository.findByIds(ids); } ``` 3. Decorator: ```ts @Mutation() async mutationThatAffectLoader( @Arg("input") input: SomeInput, @DataLoader(User) loader, ) { const result = await this.mutateSomething(input); loader.clear(input.someKey); return result; } ```
Posted by MichalLytek on Mar 27, 2018, 7:59 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Feature: Data loader integration
https://github.com/facebook/dataloader 1. Caching resolving the same data 2. Instead of normal resolving: ```ts @FieldResolver() author(@Root() recipe: Recipe) { return this.userRepository.findById(recipe.authorId); } ``` Introduce batched resolving - taking array of roots: ```ts @FieldResolver() async author(@Root() recipes: Recipe[]) { const ids = recipes.map(r => r.authorId); return this.userRepository.findByIds(ids); } ``` 3. Decorator: ```ts @Mutation() async mutationThatAffectLoader( @Arg("input") input: SomeInput, @DataLoader(User) loader, ) { const result = await this.mutateSomething(input); loader.clear(input.someKey); return result; } ```
Comments (0)
No comments yet. Start the discussion.