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{})
| 91 | // doQueryWithProgressIndicator wraps API calls with a progress indicator. |
| 92 | // The query name is used in the progress indicator label. |
| 93 | func (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 |
| 101 | func (c *Client) Mutate(operationName string, query interface{}, variables map[string]interface{}) error { |
no test coverage detected