public JsonApiApplicationBuilder(IServiceCollection services, IMvcCoreBuilder mvcBuilder)
        {
            _services   = services ?? throw new ArgumentNullException(nameof(services));
            _mvcBuilder = mvcBuilder ?? throw new ArgumentNullException(nameof(mvcBuilder));

            _intermediateProvider = services.BuildServiceProvider();
            var loggerFactory = _intermediateProvider.GetRequiredService <ILoggerFactory>();

            _resourceGraphBuilder   = new ResourceGraphBuilder(_options, loggerFactory);
            _serviceDiscoveryFacade = new ServiceDiscoveryFacade(_services, _resourceGraphBuilder, _options, loggerFactory);
        }