-
-
Save tomachristian/c523f8d196b76edc4924f8235543f889 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NodeResolver] | |
public static Task<Entity?> Get( | |
Id id, | |
IResolverContext resolver, | |
IEntityByIdDataLoader entityById, | |
CancellationToken cancellationToken) | |
{ | |
// Invoked twice during the same request | |
} | |
[DataLoader] | |
public static async Task<Dictionary<Guid, Entity>> GetEntityById( | |
IReadOnlyList<Guid> ids, | |
ScopedDbContext db, | |
CancellationToken cancellationToken) | |
{ | |
// Should be invoked once, but actually invoked twice; yields to SQL queries instead of one | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment