These are chat archives for 47deg/fetch

Feb 2018
Raúl Raja Martínez
Feb 02 2018 01:40
sorry it took me so long to get back to this, I think you can just apply the data source implicitly locally with whatever constructions params you need per call. something along the lines of?
def doInRequestContext(ctx: Context, p: Param): ? = {
   implicit val dataSource = CustomDataSource(ctx, p)
wouldn't something like that works to not just in fetch but to inject parameters into any arbitrary type class instances?
Sebastian Wiesner
Feb 02 2018 08:47
@raulraja I thought about this as well; I just wasn't sure whether it's "intended" use of this library, ie, whether we should instantiate data sources locally. But I'll try and see how it goes, many thanks for your help :+1:
Justin Heyes-Jones
Feb 02 2018 17:27
Ah, that's a nice and simple solution. I thought the question was how to pass a specific context based on the data source id