Not fully understanding the purpose of this project
@nikithauc y travaille déjà.
Depuis le 7/4/2021.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Hi there.
I've been using the microsoft graph client and the types in this repo.
The thing I don't fully understand, is why the types are separate from the microsoft graph client project, and why I need to explicitly typecast. It relies on me, the consumer, knowing the types ahead of time. I don't know the request or response data schema for all the endpoints, so how am I supposed to typecast? This approach seems a little risky to me, I could be typecasting wrong and could be using the wrong data structures.
Can someone clarify the situation and explain the microsoft graph client doesn't just use the types in this repo? It would make consumers's lives a lot better!
The client should provide the types for every endpoint. In the example below, as i consumer, I expect the client to tell me the types it expects:
// `user` should be typed by default
// the return type should be typed by default
client.api(`/users/${id}`).patch(user);
If the types cannot be combined with the client, can i suggest a slightly better approach (imo) for handling types. Instead of typecasting we can use generics:
client.api(`/users/${id}`).patch<RequestType, ResponseType>(user);
AB#8842
- Langage dominant
- PowerShell
- Étoiles
- 129
- Forks
- 35
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoftgraph/msgraph-typescript-typings
-
status:waiting-for-triage type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
microsoftgraph/msgraph-typescript-typings#756 · 1 réaction ·
-
status:waiting-for-triage type:bug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
microsoftgraph/msgraph-typescript-typings#748 · 2 réactions ·
-
status:waiting-for-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
-
status:waiting-for-triage type:feature
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
microsoftgraph/msgraph-typescript-typings#530 · 1 réaction ·
Toutes les issues de microsoftgraph/msgraph-typescript-typings