Skip to content

Commit

Permalink
Remove unused helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn committed Nov 22, 2024
1 parent e4d4c99 commit 3f7957c
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions strawberry/http/__init__.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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",
]

0 comments on commit 3f7957c

Please sign in to comment.