strawberry-graphql 0.268.0__py3-none-any.whl → 0.268.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- strawberry/schema/schema_converter.py +8 -12
- strawberry/schema/types/scalar.py +1 -0
- strawberry/types/arguments.py +5 -0
- strawberry/types/scalar.py +2 -0
- {strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/RECORD +9 -9
- {strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/entry_points.txt +0 -0
@@ -270,10 +270,7 @@ class GraphQLCoreConverter:
|
|
270
270
|
GlobalID,
|
271
271
|
name=global_id_name,
|
272
272
|
description=GraphQLID.description,
|
273
|
-
|
274
|
-
GraphQLID.parse_literal(v, vars)
|
275
|
-
),
|
276
|
-
parse_value=GlobalID.from_id,
|
273
|
+
parse_value=lambda v: v,
|
277
274
|
serialize=str,
|
278
275
|
specified_by_url=("https://relay.dev/graphql/objectidentification.htm"),
|
279
276
|
)
|
@@ -803,6 +800,13 @@ class GraphQLCoreConverter:
|
|
803
800
|
return _resolver
|
804
801
|
|
805
802
|
def from_scalar(self, scalar: type) -> GraphQLScalarType:
|
803
|
+
from strawberry.relay.types import GlobalID
|
804
|
+
|
805
|
+
if not self.config.relay_use_legacy_global_id and scalar is GlobalID:
|
806
|
+
from strawberry import ID
|
807
|
+
|
808
|
+
return self.from_scalar(ID)
|
809
|
+
|
806
810
|
scalar_definition: ScalarDefinition
|
807
811
|
|
808
812
|
if scalar in self.scalar_registry:
|
@@ -818,20 +822,12 @@ class GraphQLCoreConverter:
|
|
818
822
|
scalar_name = self.config.name_converter.from_type(scalar_definition)
|
819
823
|
|
820
824
|
if scalar_name not in self.type_map:
|
821
|
-
from strawberry.relay import GlobalID
|
822
|
-
|
823
|
-
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
824
|
-
GraphQLNamedType.reserved_types.pop("ID")
|
825
|
-
|
826
825
|
implementation = (
|
827
826
|
scalar_definition.implementation
|
828
827
|
if scalar_definition.implementation is not None
|
829
828
|
else _make_scalar_type(scalar_definition)
|
830
829
|
)
|
831
830
|
|
832
|
-
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
833
|
-
GraphQLNamedType.reserved_types["ID"] = implementation
|
834
|
-
|
835
831
|
self.type_map[scalar_name] = ConcreteType(
|
836
832
|
definition=scalar_definition, implementation=implementation
|
837
833
|
)
|
strawberry/types/arguments.py
CHANGED
@@ -170,6 +170,11 @@ def convert_argument(
|
|
170
170
|
]
|
171
171
|
|
172
172
|
if is_scalar(type_, scalar_registry):
|
173
|
+
from strawberry.relay.types import GlobalID
|
174
|
+
|
175
|
+
if type_ is GlobalID:
|
176
|
+
return GlobalID.from_id(value) # type: ignore
|
177
|
+
|
173
178
|
return value
|
174
179
|
|
175
180
|
if isinstance(type_, EnumDefinition):
|
strawberry/types/scalar.py
CHANGED
@@ -43,6 +43,7 @@ class ScalarDefinition(StrawberryType):
|
|
43
43
|
parse_value: Optional[Callable]
|
44
44
|
parse_literal: Optional[Callable]
|
45
45
|
directives: Iterable[object] = ()
|
46
|
+
origin: Optional[GraphQLScalarType | type] = None
|
46
47
|
|
47
48
|
# Optionally store the GraphQLScalarType instance so that we don't get
|
48
49
|
# duplicates
|
@@ -115,6 +116,7 @@ def _process_scalar(
|
|
115
116
|
parse_literal=parse_literal,
|
116
117
|
parse_value=parse_value,
|
117
118
|
directives=directives,
|
119
|
+
origin=cls, # type: ignore[arg-type]
|
118
120
|
_source_file=_source_file,
|
119
121
|
_source_line=_source_line,
|
120
122
|
)
|
@@ -168,11 +168,11 @@ strawberry/schema/config.py,sha256=KeZ1Pc1gvYK0fOx9Aghx7m0Av8sWexycl3HJGFgHPvg,9
|
|
168
168
|
strawberry/schema/exceptions.py,sha256=rqVNb_oYrKM0dHPgvAemqCG6Um282LPPu4zwQ5cZqs4,584
|
169
169
|
strawberry/schema/name_converter.py,sha256=xFOXEgqldFkxXRkIQvsJN1dPkWbEUaIrTYNOMYSEVwQ,6945
|
170
170
|
strawberry/schema/schema.py,sha256=rDfNclXSRHqn3NNGzPAovZoVeMh0VC5wVCCUprwZJV8,34215
|
171
|
-
strawberry/schema/schema_converter.py,sha256=
|
171
|
+
strawberry/schema/schema_converter.py,sha256=_lKctaIfNcncVCan8AElYngGxMS8vf4Wy27tXfkr0Mk,39011
|
172
172
|
strawberry/schema/types/__init__.py,sha256=oHO3COWhL3L1KLYCJNY1XFf5xt2GGtHiMC-UaYbFfnA,68
|
173
173
|
strawberry/schema/types/base_scalars.py,sha256=JRUq0WjEkR9dFewstZnqnZKp0uOEipo4UXNF5dzRf4M,1971
|
174
174
|
strawberry/schema/types/concrete_type.py,sha256=axIyFZgdwNv-XYkiqX67464wuFX6Vp0jYATwnBZSUvM,750
|
175
|
-
strawberry/schema/types/scalar.py,sha256=
|
175
|
+
strawberry/schema/types/scalar.py,sha256=bg9AumdmYUBuvaKoEZtP9YKJ7lwMtDMCWFTsZQwpdQY,2375
|
176
176
|
strawberry/schema/validation_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
177
177
|
strawberry/schema/validation_rules/one_of.py,sha256=fPuYzCyLT7p9y7dHF_sWTImArTQaEhyF664lZijB1Gw,2629
|
178
178
|
strawberry/schema_codegen/__init__.py,sha256=mN4Qmu5Iakht6nHpRpt9hCs8e--oTPlVtDJZJpzgHR4,24364
|
@@ -195,7 +195,7 @@ strawberry/tools/__init__.py,sha256=pdGpZx8wpq03VfUZJyF9JtYxZhGqzzxCiipsalWxJX4,
|
|
195
195
|
strawberry/tools/create_type.py,sha256=--DgfZOmXJBKGcVxehNISyvpw1HzwFvRtUUPc0634MA,2056
|
196
196
|
strawberry/tools/merge_types.py,sha256=hUMRRNM28FyPp70jRA3d4svv9WoEBjaNpihBt3DaY0I,1023
|
197
197
|
strawberry/types/__init__.py,sha256=baWEdDkkmCcITOhkg2hNUOenrNV1OYdxGE5qgvIRwwU,351
|
198
|
-
strawberry/types/arguments.py,sha256=
|
198
|
+
strawberry/types/arguments.py,sha256=DVouyH70uvTcFP3PmRzo8QdMThoqXdigJbWE9Lgn5pU,9849
|
199
199
|
strawberry/types/auto.py,sha256=WZ2cQAI8nREUigBzpzFqIKGjJ_C2VqpAPNe8vPjTciM,3007
|
200
200
|
strawberry/types/base.py,sha256=tZSqxtrxXa1Y964HS2uakCbCgLyGO9A4WpODiegWzF8,15122
|
201
201
|
strawberry/types/cast.py,sha256=fx86MkLW77GIximBAwUk5vZxSGwDqUA6XicXvz8EXwQ,916
|
@@ -212,7 +212,7 @@ strawberry/types/mutation.py,sha256=cg-_O2WWnZ-GSwOIv0toSdxlGeY2lhBBxZ24AifJuSM,
|
|
212
212
|
strawberry/types/nodes.py,sha256=RwZB43OT9BS3Cqjgq4AazqOfyq_y0GD2ysC86EDBv5U,5134
|
213
213
|
strawberry/types/object_type.py,sha256=SZOzxaS318079G-pr-1PM5iMoTddxdw8KD4cI67IhzI,15579
|
214
214
|
strawberry/types/private.py,sha256=DhJs50XVGtOXlxWZFkRpMxQ5_6oki0-x_WQsV1bGUxk,518
|
215
|
-
strawberry/types/scalar.py,sha256=
|
215
|
+
strawberry/types/scalar.py,sha256=vUWGwAYgcfY26jQUdBJ1tGOvrBq92V0p9L8AWXM7bkk,6384
|
216
216
|
strawberry/types/type_resolver.py,sha256=fH2ZOK4dAGgu8AMPi-JAXe_kEAbvvw2MCYXqbpx-kTc,6529
|
217
217
|
strawberry/types/union.py,sha256=rwZoJcMdUxJBlYMwx3ONByv6BylhvXT0Bflem6xzMM4,10090
|
218
218
|
strawberry/types/unset.py,sha256=7DVK-WWxVLo41agvavTvIbphE42BmY8UpGolXfasIvw,1682
|
@@ -229,8 +229,8 @@ strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,7
|
|
229
229
|
strawberry/utils/operation.py,sha256=s7ajvLg_q6v2mg47kEMQPjO_J-XluMKTCwo4d47mGvE,1195
|
230
230
|
strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
|
231
231
|
strawberry/utils/typing.py,sha256=SDvX-Du-9HAV3-XXjqi7Q5f5qPDDFd_gASIITiwBQT4,14073
|
232
|
-
strawberry_graphql-0.268.
|
233
|
-
strawberry_graphql-0.268.
|
234
|
-
strawberry_graphql-0.268.
|
235
|
-
strawberry_graphql-0.268.
|
236
|
-
strawberry_graphql-0.268.
|
232
|
+
strawberry_graphql-0.268.2.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
233
|
+
strawberry_graphql-0.268.2.dist-info/METADATA,sha256=45ElBfI-81g2FDxOJvFsTe603lAjC06OFzlKGxBXfFg,7679
|
234
|
+
strawberry_graphql-0.268.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
235
|
+
strawberry_graphql-0.268.2.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
236
|
+
strawberry_graphql-0.268.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0.dist-info → strawberry_graphql-0.268.2.dist-info}/entry_points.txt
RENAMED
File without changes
|