I was wondering if it is possible to pass a different class based on the query you're currently on in DI in HotChocolate.
So saying I have an interface like :
public interface IPrinter
{
public string Print();
}
and classes that implement the interface :
public class PhysicalPrinter : IPrinter{
public string Print(){
//do some stuff
}
public class Digitalprinter : IPrinter{
public string Print()
{
// do other stuff
}
}
And I have the following queries :
Is there any way I can tell HotChocolate to use the PhysicalPrinter when it's inside "Customer" and when the query is "administration" it will use the DigitalPrinter ?