Skip to content

Commit

Permalink
Simplify httpx transport
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz committed Feb 8, 2024
1 parent defef71 commit faa40d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gql/transport/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ def _prepare_result(self, response: httpx.Response) -> ExecutionResult:
log.debug("<<< %s", response.text)

try:
result: Dict[str, Any]
if self.json_deserialize == json.loads:
result = response.json()
else:
result = self.json_deserialize(response.content)
result: Dict[str, Any] = self.json_deserialize(response.content)

except Exception:
self._raise_response_error(response, "Not a JSON answer")
Expand Down

0 comments on commit faa40d7

Please sign in to comment.