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, GraphQLError will be returned, but the receiver will also be partially populated.
(hostname, name string, query interface{}, variables map[string]interface{})
| 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. |
| 81 | func (c Client) Query(hostname, name string, query interface{}, variables map[string]interface{}) error { |
| 82 | opts := clientOptions(hostname, c.http.Transport) |
| 83 | opts.Headers[graphqlFeatures] = features |
| 84 | gqlClient, err := ghAPI.NewGraphQLClient(opts) |
| 85 | if err != nil { |
| 86 | return err |
| 87 | } |
| 88 | return handleResponse(gqlClient.Query(name, query, variables)) |
| 89 | } |
| 90 | |
| 91 | // QueryWithContext 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, |
| 92 | // GraphQLError will be returned, but the receiver will also be partially populated. |
nothing calls this directly
no test coverage detected