ExodusMovement / fetch

MIT License
0 stars 0 forks source link

feat: inject fetch #8

Closed sparten11740 closed 1 year ago

sparten11740 commented 1 year ago

POC of how we could get rid of globally setting fetch on fetchival in a non-breaking way, defaulting to the previous behavior if fetch is not injected via options. ~Just a basis for discussion, if we want to go ahead with this, I'd propose we do the same thing for the experimental version.~ Done the same for the experimental version now, this is good to go

Towards https://github.com/ExodusMovement/exodus-hydra/pull/3966#issuecomment-1714273515

sparten11740 commented 1 year ago

I personally prefer the factory because it separates parameters that are use-case dependant from those that aren't. Initially I didn't go for that because I thought it would be breaking, but thinking about it again we can still export an instance created from that factory defaulting to the fetch instance in the same way as we currently do. Will change