We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
I see errors
decoding response: json: cannot unmarshal string into Go struct field graphResponse.Errors of type graphql.graphErr
So, how I can easily print raw response without changing the library?
The text was updated successfully, but these errors were encountered:
It's not trivial... but it's possible. I use this technique for many libraries that don't provide an interface to do it.
http.Client
http.RoundTripper
graphql.Client
The most tricky one is (2):
// "github.com/henvic/httpretty" logger := &httpretty.Logger{} httpClient = &http.Client{ Transport: logger.RoundTripper(http.DefaultTransport), } gqlClient := graphql.NewClient(endpoint, graphql.WithHTTPClient(httpClient))
Sorry, something went wrong.
Oh, I just discovered there is a simpler way: gqlClient.Log = func(s string) { log.Println(s) }
gqlClient.Log = func(s string) { log.Println(s) }
No branches or pull requests
Hi!
I see errors
So, how I can easily print raw response without changing the library?
The text was updated successfully, but these errors were encountered: