microsoftgraph / microsoftgraph/msgraph-sdk-typescript

Expose the batch endpoint via the SDK

Open
#907 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage ToTriage type:feature
Dominant language
TypeScript
Stars
44
Forks
7
Avg merge
12h 40m
Merged PRs (30d)
5

Description

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

The core library added support for batching in https://github.com/microsoftgraph/msgraph-sdk-typescript-core/pull/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with GraphServiceClient and the core library's BatchRequestContent and BatchRequestContentCollection APIs, then compare the analogous .NET SDK pattern described in the issue. Done means callers can construct batch content with graphClient, add request steps, and submit it through graphClient.batch.post without separately providing the request adapter or error mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.