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

fix(GHES): Remove versioning from GraphQL API endpoint URL in discussions.py #432

Merged

Conversation

Jalmeida1994
Copy link
Contributor

Pull Request

Proposed Changes

This pull request modifies the GraphQL API endpoint URL construction in the discussions.py file. The change ensures proper handling of GitHub Enterprise Server (GHES) GraphQL API endpoints.

  • Removed /v3 from the API endpoint construction as GraphQL APIs in GHES use /api/graphql instead of /api/v3/graphql
  • This fixes 404 errors when attempting to access GraphQL endpoints on GHES instances

According to the GitHub Enterprise Server GraphQL documentation, the correct endpoint format is http(s)://HOSTNAME/api/graphql. Unlike REST APIs which use versioning (/api/v3), GraphQL APIs in GHES do not include version numbers in the URL path.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance, or breaking

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

@github-actions github-actions bot added the fix label Nov 27, 2024
@Jalmeida1994 Jalmeida1994 changed the title Fix(GHES): Remove versioning from GraphQL API endpoint URL in discussions.py fix(GHES): Remove versioning from GraphQL API endpoint URL in discussions.py Nov 27, 2024
@jmeridth jmeridth merged commit c0b6fb2 into github:main Nov 27, 2024
7 of 8 checks passed
@Jalmeida1994 Jalmeida1994 deleted the bug/remove-v3-from-graphql-api-path branch November 27, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants