Skip to content

Expose the batch endpoint via the SDK #907

Description

Is your feature request related to a problem? Please describe the problem.

The core library added support for batching in microsoftgraph/msgraph-sdk-typescript-core#354. However, it is difficult to use as GraphServiceClient exposes no request builders for sending batch requests. As it stands now, you have to create a BatchRequestContent or BatchRequestContentCollection object, passing in a request adapter and error mappings, neither of which are exposed by the client for re-use. This breaks from the approach of other Kiota-based SDKs.

Describe the solution you'd like.

Devs should be able to follow a pattern similar to the .NET SDK, similiar to:

const getMeRequest = graphClient.me.toGetRequestInformation();

const batchRequest = new BatchRequestContent(graphClient);
batchRequest.addBatchRequestStep(getMeRequest);

const response = await graphClient.batch.post(batchRequest);

Additional context?

No response

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions