Skip to content
New issue

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

Refactor test client #861

Merged
merged 1 commit into from
Sep 17, 2019
Merged

Refactor test client #861

merged 1 commit into from
Sep 17, 2019

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Sep 16, 2019

There have been a few PRs adding various features to the http client:

After #720 we took this client and kept iterating internally - this pr is that code cleaned up and reintegrated with gqlgen.

Notable changes:

  • takes a http.Handler instead of a url. This produces better stacktraces on panics and hides the cleanup logic from the user.
  • makes http.Request available to Options, this means headers can now easily be added both inside this lib and outside.
  • add Options to the client.New method, so options can be applied from across multiple tests easily (eg csrf headers)

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs) - NA

@vektah vektah requested a review from lwc September 16, 2019 05:13
@vektah vektah force-pushed the refactor-test-client branch 2 times, most recently from ba60c3d to 9fff140 Compare September 16, 2019 05:22
This was referenced Sep 16, 2019
@vektah vektah force-pushed the refactor-test-client branch from 9fff140 to 4162d11 Compare September 16, 2019 08:06
@coveralls
Copy link

coveralls commented Sep 16, 2019

Coverage Status

Coverage increased (+0.1%) to 61.949% when pulling 9fff140 on refactor-test-client into 55b2144 on master.

@vektah vektah merged commit 17f32d2 into master Sep 17, 2019
@vektah vektah deleted the refactor-test-client branch September 17, 2019 03:14
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants