Skip to content

Dataloader Query Variables #5957

Answered by PascalSenn
alexmarmon asked this question in Q&A
Discussion options

You must be logged in to vote

You currently have to pass them in through the key. You can use tuples or records as the key.

public record struct Example(string Key, Variables Variables)
public class IsOnHoldDataLoader : BatchDataLoader< Example, bool> {
        private readonly IDbContextFactory<AppDbContext> _dbContextFactory;
        private IHttpContextAccessor _contextAccessor;
        private IResolverContext _resolverContext;

        public IsOnHoldDataLoader(
            IDbContextFactory<AppDbContext> dbContextFactory,
            IBatchScheduler batchScheduler,
            DataLoaderOptions options = null)
            : base(batchScheduler, options) {
            _dbContextFactory = dbContextFactory;
      …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alexmarmon
Comment options

Answer selected by alexmarmon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants