chore(graph-utils): export GraphClient base class#2429
Conversation
Make the GraphClient base class available alongside CalendarClient/MailClient (which already extend it) so downstream agents can build new Microsoft Graph-backed clients without copying the auth/transport plumbing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR broadens the public API surface of the graph-utils package by exporting the shared GraphClient base class from the package entrypoint, enabling downstream agents to build additional Microsoft Graph–backed clients without duplicating auth/transport logic.
Changes:
- Re-export
GraphClient(alongsideErrorResponse) fromsrc/index.tsso it becomes available via the package root export.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Superseded by a combined PR that adds the actual motivation for exporting GraphClient: a GraphClientOptions parameter so subclasses can target a different AAD app (custom env-var prefix, persisted auth-record filename, token-cache name, and OAuth scopes). Re-opening as a single PR from |
Make the
GraphClientbase class available alongsideCalendarClient/MailClient(which already extend it) so downstream agents can build new Microsoft Graph–backed clients without copying the auth/transport plumbing.Change
ts/packages/agents/agentUtils/graphUtils/src/index.ts— addGraphClientto the existing named re-export from./graphClient.js.Risk
Additive-only. No existing consumer breaks because the export was previously narrower; all current callers use the more specific subclasses or
ErrorResponse.Test
pnpm --filter graph-utils build✓pnpm --filter graph-utils prettier✓GraphClientshows up indist/index.d.tsafter the change.