Mutate performs a GraphQL mutation based on a struct and parses the response with the same struct as the receiver. If there are errors in the response, GraphQLError will be returned, but the receiver will also be partially populated.
(hostname, name string, mutation interface{}, variables map[string]interface{})
| 67 | // Mutate performs a GraphQL mutation based on a struct and parses the response with the same struct as the receiver. If there are errors in the response, |
| 68 | // GraphQLError will be returned, but the receiver will also be partially populated. |
| 69 | func (c Client) Mutate(hostname, name string, mutation interface{}, variables map[string]interface{}) error { |
| 70 | opts := clientOptions(hostname, c.http.Transport) |
| 71 | opts.Headers[graphqlFeatures] = features |
| 72 | gqlClient, err := ghAPI.NewGraphQLClient(opts) |
| 73 | if err != nil { |
| 74 | return err |
| 75 | } |
| 76 | return handleResponse(gqlClient.Mutate(name, mutation, variables)) |
| 77 | } |
| 78 | |
| 79 | // Query performs a GraphQL query based on a struct and parses the response with the same struct as the receiver. If there are errors in the response, |
| 80 | // GraphQLError will be returned, but the receiver will also be partially populated. |
nothing calls this directly
no test coverage detected