[Bug][GitHub] GraphQL API gets different data from REST API
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
I tried to use the data from a repository with GraphQL and I got completely different data. REST API works fine.
Maybe the difference is that REST API gets the default branch, while GraphQL gets the "master" or "main" branch.
What do you expect to happen
GraphQL to return the same data of REST API, using the default branch for a repo.
How to reproduce
Select GraphQL API for GitHub and collect data
Anything else
No response
Version
1.0.5 beta
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
What kind of data were you collecting? commits? Could you provide more details? It is really hard to understand what was wrong with the current information. I don't know how to reproduce the problem and where to look 😂
All data related to contributors is different.Yes I was getting commits.You can find the charts with different data in the Components metrics dashboard. Da: "Klesh Wong" @.*** A: "apache/incubator-devlake" @.*** Cc: "Gabriele Nosso" @.,"Author" @. Data: Sat, 27 Apr 2024 19:59:19 -0700 Oggetto: Re: [apache/incubator-devlake] [Bug][GitHub] GraphQL API gets different data from REST API (Issue #7396)
What kind of data were you collecting? commits? Could you provide more details? It is really hard to understand what was wrong with the current information. I don't know how to reproduce the problem and where to look 😂
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Hi @gabrielenosso , there are many (known or unknown) differences between the results of GitHub's GraphQL or REST APIs. Considering
- the cost to make them consistent, and the long-term maintenance cost (because the API results change)
- AND we encourage users to use GraphQL and might not support REST APIs in the future because it's 10x+ slower than GraphQL.
I prefer not changing the status quo here.
I would also prefer to use GraphQL API.. point is the information I get in Grafana are not from the default branch of the repository... Da: "Louis.z" @.*** A: "apache/incubator-devlake" @.*** Cc: "Gabriele Nosso" @.,"Mention" @. Data: Sun, 28 Apr 2024 03:15:28 -0700 Oggetto: Re: [apache/incubator-devlake] [Bug][GitHub] GraphQL API gets different data from REST API (Issue #7396)
Hi @gabrielenosso , there are many (known or unknown) differences between the results of GitHub's GraphQL or REST APIs. Considering
the cost to make them consistent, and the long-term maintenance cost (because the API results change) AND we encourage users to use GraphQL and might not support REST APIs in the future because it's 10x+ slower than GraphQL.
I prefer not changing the status quo here.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Hi @gabrielenosso , we collect commits via the gitextractor plugin, not GitHub's REST APIs or GraphQL, so the difference between the commit data collected by the two APIs is not a problem.
Unless you were talking about the differences between pull requests collected by the two APIs?
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.