Are API v3 and v4 equivalent? #24559
-
Hello! I’m currently getting to know the Github API and I’ve been tasked with migrating an App that uses the API from v3 to v4. My problem is that there are certain requests from the v3 API that I can’t really migrate. For example, I don’t see a mutation in the v4 to delete a repository, or to add a collaborator to an existing repository. ¿Am I reading the documentation wrong, or there are v3 requests that as of yet, cannot be migrated to v4? Since I’m learning GraphQl it may be me not reading the documentation properly. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
It depends on how do you mean by equivalent. They could do the same thing in different ways. V4 is just a better way since it could do something in one request that would be several requests if you do it in v3. If you are trying to remove a repository, make sure your token has the scope “delete_repo” in order to do so. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer! In that case, how do you delete a repository using v4? Is not that it’s giving me an error, it’s that I didn’t find a mutation that would actually delete a repo, while in v3 there’s just an endpoint for that. |
Beta Was this translation helpful? Give feedback.
-
I have found that V4 is missing a lot of functionality compared to v3. I have the same issues as you, I need to manage teams by deleting teams, removing members from teams and inviting members. None of these are possible with V4 from what I can find, only v3. |
Beta Was this translation helpful? Give feedback.
-
That’s the answer then, thanks! What I’ll do at least is make a module were all requests are made and make and interface for it. Then I’ll update the V3 requests as V4 is updated. Thanks again! |
Beta Was this translation helpful? Give feedback.
I have found that V4 is missing a lot of functionality compared to v3. I have the same issues as you, I need to manage teams by deleting teams, removing members from teams and inviting members. None of these are possible with V4 from what I can find, only v3.