microsoftgraph / microsoftgraph/msgraph-sdk-go-core

Default Client Options

Open
#220 10 comments 0 reactions 1 assignee View on GitHub

@rkodev is already working on this.

Since Aug 24, 2023.

enhancement
Dominant language
Go
Stars
22
Forks
16
Avg merge
7h 53m
Merged PRs (30d)
1

Description

I used Kiota to generate a customized Go client library targeting the Graph API and have added the Graph Go core library to my project.

When creating a new GraphRequestAdapter the clientOptions is required, forcing users to creating their own clientOptions what might be a strange scenario since the clientOption is used to inject telemetry data around SDK versioning.

Image

Expected:

We should have a default client option where we set up the core library values as default, so when creating a new adapter, the core version will be sent to out telemetry.

authProvider, _ := auth.NewAzureIdentityAuthenticationProviderWithScopes(credential, scopes)

adapterV1, _ := msgraphcore.NewGraphRequestAdapterBase(authProvider)

client := gosdk.NewGraphBaseServiceClient(adapterV1, store.BackingStoreFactoryInstance)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.