Skip to content

Add IServiceProvider to public GraphService ctors #1250

Description

@brianjackson71

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions