Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][GitHub] GraphQL API gets different data from REST API #7396

Open
2 of 3 tasks
gabrielenosso opened this issue Apr 26, 2024 · 5 comments
Open
2 of 3 tasks

[Bug][GitHub] GraphQL API gets different data from REST API #7396

gabrielenosso opened this issue Apr 26, 2024 · 5 comments
Labels
type/bug This issue is a bug

Comments

@gabrielenosso
Copy link

Search before asking

  • 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

@gabrielenosso gabrielenosso added the type/bug This issue is a bug label Apr 26, 2024
@klesh
Copy link
Contributor

klesh commented Apr 28, 2024

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 😂

@gabrielenosso
Copy link
Author

gabrielenosso commented Apr 28, 2024 via email

@Startrekzky
Copy link
Contributor

Hi @gabrielenosso , there are many (known or unknown) differences between the results of GitHub's GraphQL or REST APIs. Considering

  1. the cost to make them consistent, and the long-term maintenance cost (because the API results change)
  2. 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.

@gabrielenosso
Copy link
Author

gabrielenosso commented Apr 28, 2024 via email

@Startrekzky
Copy link
Contributor

Startrekzky commented May 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

3 participants