Skip to content

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.

@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.

5 participants