Supporting Request Resolvers with Requirements in DataLoader

before:
  <A extends Request.Request<any, any>>(
    self: RequestResolver.RequestResolver<A, never>,
    options: {
      readonly window: Duration.DurationInput
      readonly maxBatchSize?: number
    }
  ) => Effect.Effect<RequestResolver.RequestResolver<A, never>, never, Scope.Scope>

after:
  <A extends Request.Request<any, any>, R = never>(
    self: RequestResolver.RequestResolver<A, R>,
    options: {
      readonly window: Duration.DurationInput
      readonly maxBatchSize?: number
    }
  ) => Effect.Effect<RequestResolver.RequestResolver<A, never>, never, Scope.Scope | R>


is it possible to have dataLoader support request resolvers with requirements?

I want to provide those requirements locally (where I use the dataloader) but also creator the dataloader globally in a layer (with no deps on the requirements)

I dont think thats possible right not if im not mistaken
Was this page helpful?