Much has been written about the benefits of the GitHub GraphQL API. And this is a really great technology. The only thing I can't figure out is in what situations is it still better to use the good old REST API v3?
            Asked
            
        
        
            Active
            
        
            Viewed 509 times
        
    1 Answers
6
            Github GraphQL API is subject to the following caveats:
- GraphQL API can only be accessed using authentication. You need a token to use this API. Thus, you can't use GraphQL in an environment where you can't secure the provisioning of this token. For example, in a web app without github authentication. This is a big caveat, especially for people who want to create web app or scripts that target only public repository informations.
 - Searching commits and code using the search API is not possible in Github Graphql. Only searching repos, issues and users are supported (for the search API)
 - some features like comparing commits and getting contributors are not possible yet in Graphql. Another example: you can't recursively get a tree using GraphQL API
 - some mutations already available in v3 may not yet have been implemented in GraphQL (create commit, create tag, create branch etc...), checkout mutations documentation
 
        Bertrand Martel
        
- 42,756
 - 16
 - 135
 - 159
 
- 
                    @SergeyIsaev you're welcome, you can accept the answer if it's ok – Bertrand Martel Apr 13 '21 at 11:26
 - 
                    [Recursion](https://stackoverflow.com/a/61277904/1705829) is possible in GraphQL with the `recursive` flag in `tree` – Timo Sep 01 '22 at 05:50