MCPcopy Index your code
hub / github.com/cli/cli / doQueryWithProgressIndicator

Method doQueryWithProgressIndicator

pkg/cmd/project/shared/queries/queries.go:93–98  ·  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 interface{}, variables map[string]interface{})

Source from the content-addressed store, hash-verified

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

Callers 10

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
paginateAttributesFunction · 0.80

Calls 4

handleErrorFunction · 0.85
StopProgressIndicatorMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected