{"record":{"id":"2446bc580e675a4d","repo":"github/github-mcp-server","slug":"failed-to-get-graphql-url-w","errorCode":null,"errorMessage":"failed to get GraphQL URL: %w","messagePattern":"failed to get GraphQL URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ghmcp/server.go","lineNumber":57,"sourceCode":"\traw          *raw.Client\n\trepoAccess   *lockdown.RepoAccessCache\n}\n\n// createGitHubClients creates all the GitHub API clients needed by the server.\nfunc createGitHubClients(cfg github.MCPServerConfig, apiHost utils.APIHostResolver) (*githubClients, error) {\n\trestURL, err := apiHost.BaseRESTURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get base REST URL: %w\", err)\n\t}\n\n\tuploadURL, err := apiHost.UploadURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get upload URL: %w\", err)\n\t}\n\n\tgraphQLURL, err := apiHost.GraphqlURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get GraphQL URL: %w\", err)\n\t}\n\n\trawURL, err := apiHost.RawURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get Raw URL: %w\", err)\n\t}\n\n\t// Construct REST client. When a TokenProvider is configured, we\n\t// authenticate via BearerAuthTransport and skip go-github's WithAuthToken:\n\t// the latter installs its own round tripper that would pin the static token\n\t// and shadow the dynamic one.\n\trestUATransport := &transport.UserAgentTransport{\n\t\tTransport: http.DefaultTransport,\n\t\tAgent:     fmt.Sprintf(\"github-mcp-server/%s\", cfg.Version),\n\t}\n\tvar restClient *gogithub.Client\n\tif cfg.TokenProvider != nil {\n\t\trestClient, err = gogithub.NewClient(","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/internal/ghmcp/server.go#L39-L75","documentation":"Error \"failed to get GraphQL URL: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at internal/ghmcp/server.go:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}