Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Introducing kiota fetch into Graph#712

Merged
nikithauc merged 16 commits into4.0.0microsoftgraph/msgraph-sdk-javascript:4.0.0from
nikithauc/v4-kiota-fetchmicrosoftgraph/msgraph-sdk-javascript:nikithauc/v4-kiota-fetchCopy head branch name to clipboard
Mar 24, 2022
Merged

Introducing kiota fetch into Graph#712
nikithauc merged 16 commits into4.0.0microsoftgraph/msgraph-sdk-javascript:4.0.0from
nikithauc/v4-kiota-fetchmicrosoftgraph/msgraph-sdk-javascript:nikithauc/v4-kiota-fetchCopy head branch name to clipboard

Conversation

@nikithauc
Copy link
Contributor

@nikithauc nikithauc commented Mar 18, 2022

fixes #589

  • Introduces GraphBaseClient which will be extended by GraphServiceClient v1, beta and so on. The GraphBaseClient extends the client.init() and api() methods.
  • Removed RetryHandler, TelemetryHandler, RedirectHandler
  • Adding code to configure SDKVersions in the telemetry headers.

I have currently customized the GraphServiceClient as follows:

export class GraphServiceClient extends GraphBaseClient {
     public constructor(clientOptions: ClientOptions) {
        const c : GraphSDKConfig = {
            sdkTelemetryVersion: "graph-js-sdk-v1/0.0.0"
        }
        super(clientOptions, c);
        // change to this.authprovider
        const requestAdapter = new FetchRequestAdapter(clientOptions.authProvider, undefined, undefined, this.httpClient);        this.pathParameters = {};
 .
 .
 .
}

@nikithauc nikithauc marked this pull request as draft March 18, 2022 08:39
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's huge progress! a few comments to help drive this further.

src/MiddlewareFactory.ts Outdated Show resolved Hide resolved
src/MiddlewareFactory.ts Outdated Show resolved Hide resolved
src/requestBuilderUtils/GraphBaseClient.ts Outdated Show resolved Hide resolved
@MIchaelMainer
Copy link
Contributor

Regarding your example in the PR description, let's maintain the header value according to spec:

    const c : GraphSDKConfig = {
       sdkTelemetryVersion: "graph-js-sdk-v1/0.0.0"
  }

It should look like graph-js-sdk/0.0.0 for v1.0

@sebastienlevert
Copy link
Contributor

Regarding your example in the PR description, let's maintain the header value according to spec:

    const c : GraphSDKConfig = {
       sdkTelemetryVersion: "graph-js-sdk-v1/0.0.0"
  }

It should look like graph-js-sdk/0.0.0 for v1.0

I would actually argue that it should be

// Core
graph-js-core/4.0.0

// Service Library v1.0
graph-js/1.0.0

// Service Library beta
graph-js-beta/1.0.0

@MIchaelMainer
Copy link
Contributor

I'm going to argue against myself too and agree with @sebastienlevert

@nikithauc nikithauc marked this pull request as ready for review March 24, 2022 05:14
@nikithauc
Copy link
Contributor Author

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for taking in the changes!

@nikithauc nikithauc merged commit 0111233 into 4.0.0 Mar 24, 2022
@baywet baywet deleted the nikithauc/v4-kiota-fetch branch November 30, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.