MCPcopy Create free account
hub / github.com/cli/cli / doQueryWithProgressIndicator

Method doQueryWithProgressIndicator

pkg/cmd/project/shared/queries/queries.go:94–99  ·  view source on GitHub ↗

doQueryWithProgressIndicator wraps API calls with a progress indicator. The query name is used in the progress indicator label.

(name string, query any, variables map[string]any)

Source from the content-addressed store, hash-verified

92// doQueryWithProgressIndicator wraps API calls with a progress indicator.
93// The query name is used in the progress indicator label.
94func (c *Client) doQueryWithProgressIndicator(name string, query any, variables map[string]any) error {
95 c.io.StartProgressIndicatorWithLabel(fmt.Sprintf("Fetching %s", name))
96 defer c.io.StopProgressIndicator()
97 err := c.apiClient.Query(name, query, variables)
98 return handleError(err)
99}
100
101// TODO: un-export this since it couples the caller heavily to api.GraphQLClient
102func (c *Client) Mutate(operationName string, query any, variables map[string]any) error {

Callers 11

ProjectItemsMethod · 0.95
ProjectFieldsMethod · 0.95
ViewerLoginNameMethod · 0.95
OwnerIDAndTypeMethod · 0.95
IssueOrPullRequestIDMethod · 0.95
userOrgLoginsMethod · 0.95
paginateOrgLoginsMethod · 0.95
NewProjectMethod · 0.95
ProjectsMethod · 0.95
ProjectItemIDByURLMethod · 0.95
paginateAttributesFunction · 0.80

Calls 4

handleErrorFunction · 0.85
StopProgressIndicatorMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected