Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add Graph API version to base URI

Aperta
#195 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type:feature
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

Lingua principale
PHP
Stelle
16
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-sdk-php-core

Tutte le issue di microsoftgraph/msgraph-sdk-php-core

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.