fix: adjust enterprise api url for graphql use case#2180
Conversation
There was a problem hiding this comment.
This changed behavior isn't really tested by any existing test. Because of how it is written, code coverage doesn't catch it. On the plus side, we know this doesn't break the GitHub.com scenario, but we don't have any verification of the enterprise scenario.
Please add a test to the enterprise github tests that calls createGraphQLRequest and verifies the Requester has the new expected /api/graphql URL. You don't have actually make the http call, just check the value.
There was a problem hiding this comment.
Thank you for the review @bitwiseman!
I pushed the changes.
Meanwhile, could you please invite me to hub4j-test-org for later PRs that I want to make? I need to run the tests locally for those.

Description
For
GitHub.comthis ishttps://api.github.com/graphql. ForGitHub Enterprise Server, the GraphQL endpoint is at/api/graphql (not /api/v3/graphql).This change makes sure the URL constructed appropriately.
https://docs.github.com/en/enterprise-cloud@latest/graphql/guides/managing-enterprise-accounts#3-setting-up-insomnia-to-use-the-github-graphql-api-with-enterprise-accounts
Before submitting a PR:
@linkJavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .mvn -D enable-ci clean install site "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"locally. If this command doesn't succeed, your change will not pass CI.main. You will create your PR from that branch.When creating a PR: