Add Graph API version to base URI
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading GraphClientFactory and the existing base_uri configuration, using the request examples in this issue as the expected entry points. The work is done when the factory uses Graph API version v1.0 by default, allows selecting beta, and requests no longer need a version prefix in their paths.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe the problem.
Currently, the base URI only contains the national cloud host, meaning each request needs a Graph API version prefix:
$httpClient = GraphClientFactory::createWithConfig($config);
$response = $httpClient->get("/v1.0/me");
Current workaround is to override the base_uri via config:
$httpClient = GraphClientFactory::createWithConfig(['base_uri' => NationalCloud::Global + "/v1.0"]);
$response = $httpClient->get("/me");
This would be a breaking change.
Describe the solution you'd like.
Support setting the Graph API version via the factory & default to v1.0
(With default v1.0)
$httpClient = GraphClientFactory::create();
$response = $httpClient->get("/me");
Or to change to beta
$httpClient = GraphClientFactory::setApiVersion('beta')::create();
$response = $httpClient->get("/me");
Additional context?
No response
- Dominant language
- PHP
- Stars
- 16
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-php-core
-
status:waiting-for-triage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoftgraph/msgraph-sdk-php-core#230 · 1 comment ·
-
status:waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoftgraph/msgraph-sdk-php-core#227 · 2 comments · 1 reaction ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
area:authentication goodfirstissue type:enhancement
microsoftgraph/msgraph-sdk-php-core#202 · 4 comments · 1 assignee ·
-
microsoftgraph/msgraph-sdk-php-core#132 · 1 comment · 1 assignee ·
All issues in microsoftgraph/msgraph-sdk-php-core
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Перевод устарел
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Issue: ready for confirmation Reported on 2.4.x
Difficulty 2/5 1-3 hours Newbie friendliness 88/100