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

GraphQL Query Fails with Status Code 200 on the Stats Page While Running Locally. #64

Open
luckyklyist opened this issue Sep 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@luckyklyist
Copy link
Contributor

luckyklyist commented Sep 23, 2023

Issue Description

Description:

I'm encountering an issue when making a GraphQL query to the following endpoint:

Request URL: https://api.github.com/graphql
Request Method: POST
Status Code: 200 OK

However, the response I receive is:

{
    "data": {
        "user": null
    },
    "errors": [
        {
            "type": "INTERNAL",
            "message": "Something went wrong while executing your query. Please include `C50A:6791:B4B973:BCA94B:650F16BA` when reporting this issue."
        }
    ]
}

Steps to Reproduce

  • Run the github-stats project locally.
  • Navigate to the page stats/(username).
  • Open the browser's developer tools and check the network tab for requests.

Expected Result

The expected result is that the query should fetch responses, similar to the hosted site: https://public-github-stats.vercel.app/stats/(username).

Screenshots or Videos (Optional)

You can view the screenshots of the issue:

Screenshot 1
Screenshot 2

Additional Information

Please indicate if you've used the search function to check if a similar issue already exists. Additionally, let us know if you'd like to work on resolving this issue.

@luckyklyist luckyklyist added the bug Something isn't working label Sep 23, 2023
@luckyklyist
Copy link
Contributor Author

Note that the query fails when using

# Github OAuth (optional, but recommended)
#GITHUB_ID=
#GITHUB_SECRET=

and using the login with the github Btn .

But it works with the DEV_GITHUB_TOKEN env and using the signin with credentials Btn .

@Balastrong
Copy link
Member

Thanks for all the details @luckyklyist!

With my tokens (GITHUB_ID and GITHUB_SECRET) the Github login works, so there's probably something in how you set those two variables.

It's great to hear with the credentials login it works! I'll keep this issue open in case someone has a similar issue and finds even more details.

To doublecheck if you used the other two variables right, you can read the guide in the docs: https://github.com/Balastrong/github-stats/blob/main/CONTRIBUTING.md#setup-github-oauth-app-optional

@Dev00kushal
Copy link

@luckyklyist Thank you for raising this issue 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants