MCPcopy
hub / github.com/cli/cli / GraphQLEndpoint

Function GraphQLEndpoint

internal/ghinstance/host.go:46–57  ·  view source on GitHub ↗
(hostname string)

Source from the content-addressed store, hash-verified

44}
45
46func GraphQLEndpoint(hostname string) string {
47 if isGarage(hostname) {
48 return fmt.Sprintf("https://%s/api/graphql", hostname)
49 }
50 if ghauth.IsEnterprise(hostname) {
51 return fmt.Sprintf("https://%s/api/graphql", hostname)
52 }
53 if strings.EqualFold(hostname, localhost) {
54 return fmt.Sprintf("http://api.%s/graphql", hostname)
55 }
56 return fmt.Sprintf("https://api.%s/graphql", hostname)
57}
58
59func RESTPrefix(hostname string) string {
60 if isGarage(hostname) {

Callers 3

GetCurrentLoginFunction · 0.92
httpRequestFunction · 0.92
TestGraphQLEndpointFunction · 0.85

Calls 1

isGarageFunction · 0.85

Tested by 1

TestGraphQLEndpointFunction · 0.68