@MichaelShirk after re-reading your initial question I think I know what is the problem. I haven’t noticed first time that you are injecting not in graph but in a normal C# type - your data service.
You see, the InjectDependency mechanism supports DI injection only in graphs, graph extensions, Acumatica attributes derived from PXEventSubscriberAttribute, and custom graph views and actions. You can’t inject into a regular C# type with this mechanism.
On the other hand, all is not lost. On the contrary, you can use normal DI constructor injection with Autofac framework. You can read more here, basically, you can scroll to the constructor injection:
https://www.devleader.ca/2023/08/22/dependency-injection-how-to-start-with-autofac-the-easy-way/
You just need to add a parameter to your data service , so it would look like this:
public class SWZohoDataService : ISWZohoDataService
{
// you can keep graph instance if you need it,
// although it may be cleaner to create a dedicated graph type without members
// for the data service.
private readonly PXGraph _graph;
// No need for the attribute, also no need to make this a property
private readonly ISWZohoAuthService _authService;
public SWZohoDataService(ISWZohoAuthService authService)
{
// parameter will be provided by Autofac during the component resolution
_authService = authService;
_graph = PXGraph.CreateInstance<PXGraph>();
}
}