Skip to content
Discussion options

You must be logged in to vote

Problem solved. The issue was that I was injecting the data loader into my repo in the data access layer. This requires a scheduler to be registered with the DI container as well. When using it this way, there is no need to add the data loader to the GraphQL middleware.
services.AddScoped<IBatchScheduler, AutoBatchScheduler>();
services.AddScoped<IUserDataLoaderByUsername, UserDataLoaderByUsername>();
services.AddScoped<IUserDataLoaderById, UserDataLoaderById>();

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mnunez97yahoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant