From a5d38cf9c367c22f2bd1a931177f3626d1c5623b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 12 Apr 2026 18:02:53 -0400 Subject: [PATCH] Fix GraphQL status code never being applied to response graphql_response() computed status_code (200 or 400) but only returned it in an unused tuple instead of setting resp.status_code. All GraphQL error responses were returning 200. Co-Authored-By: Claude Opus 4.6 (1M context) --- responder/ext/graphql/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/responder/ext/graphql/__init__.py b/responder/ext/graphql/__init__.py index 120ff10..537ee4c 100644 --- a/responder/ext/graphql/__init__.py +++ b/responder/ext/graphql/__init__.py @@ -101,8 +101,7 @@ class GraphQLView: response_data["data"] = result.data resp.media = response_data - status_code = 200 if not result.errors else 400 - return (query, json.dumps(response_data), status_code) + resp.status_code = 200 if not result.errors else 400 async def on_request(self, req, resp): await self.graphql_response(req, resp)