From 3f7957c7c52488264017e92d2f88bec7c54aac69 Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Fri, 22 Nov 2024 16:02:45 +0100 Subject: [PATCH] Remove unused helpers --- strawberry/http/__init__.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/strawberry/http/__init__.py b/strawberry/http/__init__.py index 722f82560f..86f295b9c3 100644 --- a/strawberry/http/__init__.py +++ b/strawberry/http/__init__.py @@ -1,8 +1,7 @@ from __future__ import annotations -import json from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional +from typing import TYPE_CHECKING, Any, Dict, List, Optional from typing_extensions import Literal, TypedDict if TYPE_CHECKING: @@ -36,25 +35,8 @@ class GraphQLRequestData: protocol: Literal["http", "multipart-subscription"] = "http" -def parse_query_params(params: Dict[str, str]) -> Dict[str, Any]: - if "variables" in params: - params["variables"] = json.loads(params["variables"]) - - return params - - -def parse_request_data(data: Mapping[str, Any]) -> GraphQLRequestData: - return GraphQLRequestData( - query=data.get("query"), - variables=data.get("variables"), - operation_name=data.get("operationName"), - ) - - __all__ = [ "GraphQLHTTPResponse", "process_result", "GraphQLRequestData", - "parse_query_params", - "parse_request_data", ]