Due to a change in the inventorySetQuantities mutation in version 2026-04, I need to pass a null value for changeFromQuantity. Which means I need a way of changing the serialisation options to not ignore null valued properties.
Looking at the implementation of GraphService, is method InitializeDependences which takes an IServiceProvider parameter. In theory I could register alternative json settings object in DI and GraphService would use it.
Unfortunately, all of the public ctors pass a null IServiceProvider to InitializeDependences.
I propose a nullable IServiceProvider parameter is added to all public GraphService ctors which is then passed to the InitializeDependences call in these ctors.
This appears to be a safe change and I'm happy to raise a PR for it, but thought I'd discuss it here first.
Due to a change in the
inventorySetQuantitiesmutation in version2026-04, I need to pass a null value forchangeFromQuantity. Which means I need a way of changing the serialisation options to not ignore null valued properties.Looking at the implementation of
GraphService, is methodInitializeDependenceswhich takes anIServiceProviderparameter. In theory I could register alternative json settings object in DI andGraphServicewould use it.Unfortunately, all of the public ctors pass a null
IServiceProvidertoInitializeDependences.I propose a nullable
IServiceProviderparameter is added to all publicGraphServicectors which is then passed to theInitializeDependencescall in these ctors.This appears to be a safe change and I'm happy to raise a PR for it, but thought I'd discuss it here first.