id int64 1 6.07M | name stringlengths 1 295 | code stringlengths 12 426k | language stringclasses 1
value | source_file stringlengths 5 202 | start_line int64 1 158k | end_line int64 1 158k | repo dict |
|---|---|---|---|---|---|---|---|
6,070,301 | __init__ | def __init__(
self,
name: str,
serialize: Optional[GraphQLScalarSerializer] = None,
parse_value: Optional[GraphQLScalarValueParser] = None,
parse_literal: Optional[GraphQLScalarLiteralParser] = None,
description: Optional[str] = None,
specified_by_url: Optional[st... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 347 | 401 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,302 | __repr__ | def __repr__(self) -> str:
return f"<{self.__class__.__name__} {self.name!r}>" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 403 | 404 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,303 | __str__ | def __str__(self) -> str:
return self.name | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 406 | 407 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,304 | serialize | def serialize(value: Any) -> Any:
"""Serializes an internal value to include in a response.
This default method just passes the value through and should be replaced
with a more specific version when creating a scalar type.
"""
return value | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 410 | 416 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,305 | parse_value | def parse_value(value: Any) -> Any:
"""Parses an externally provided value to use as an input.
This default method just passes the value through and should be replaced
with a more specific version when creating a scalar type.
"""
return value | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 419 | 425 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,306 | parse_literal | def parse_literal(
self, node: ValueNode, variables: Optional[Dict[str, Any]] = None
) -> Any:
"""Parses an externally provided literal value to use as an input.
This default method uses the parse_value method and should be replaced
with a more specific version when creating a scala... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 427 | 435 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,307 | to_kwargs | def to_kwargs(self) -> GraphQLScalarTypeKwargs:
# noinspection PyArgumentList
return GraphQLScalarTypeKwargs( # type: ignore
super().to_kwargs(),
serialize=None
if self.serialize is GraphQLScalarType.serialize
else self.serialize,
parse_value=... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 437 | 452 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,308 | __copy__ | def __copy__(self) -> "GraphQLScalarType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 454 | 455 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,309 | is_scalar_type | def is_scalar_type(type_: Any) -> bool:
return isinstance(type_, GraphQLScalarType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 458 | 459 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,310 | assert_scalar_type | def assert_scalar_type(type_: Any) -> GraphQLScalarType:
if not is_scalar_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Scalar type.")
return cast(GraphQLScalarType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 462 | 465 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,311 | __init__ | def __init__(
self,
type_: "GraphQLOutputType",
args: Optional[GraphQLArgumentMap] = None,
resolve: Optional["GraphQLFieldResolver"] = None,
subscribe: Optional["GraphQLFieldResolver"] = None,
description: Optional[str] = None,
deprecation_reason: Optional[str] = ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 494 | 549 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,312 | __repr__ | def __repr__(self) -> str:
return f"<{self.__class__.__name__} {self.type!r}>" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 551 | 552 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,313 | __str__ | def __str__(self) -> str:
return f"Field: {self.type}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 554 | 555 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,314 | __eq__ | def __eq__(self, other: Any) -> bool:
return self is other or (
isinstance(other, GraphQLField)
and self.type == other.type
and self.args == other.args
and self.resolve == other.resolve
and self.description == other.description
and self.dep... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 557 | 566 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,315 | to_kwargs | def to_kwargs(self) -> GraphQLFieldKwargs:
return GraphQLFieldKwargs(
type_=self.type,
args=self.args.copy() if self.args else None,
resolve=self.resolve,
subscribe=self.subscribe,
deprecation_reason=self.deprecation_reason,
description=sel... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 568 | 578 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,316 | __copy__ | def __copy__(self) -> "GraphQLField": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 580 | 581 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,317 | __init__ | def __init__(
self,
type_: "GraphQLInputType",
default_value: Any = Undefined,
description: Optional[str] = None,
deprecation_reason: Optional[str] = None,
out_name: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[Inpu... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 651 | 685 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,318 | __eq__ | def __eq__(self, other: Any) -> bool:
return self is other or (
isinstance(other, GraphQLArgument)
and self.type == other.type
and self.default_value == other.default_value
and self.description == other.description
and self.deprecation_reason == other.... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 687 | 696 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,319 | to_kwargs | def to_kwargs(self) -> GraphQLArgumentKwargs:
return GraphQLArgumentKwargs(
type_=self.type,
default_value=self.default_value,
description=self.description,
deprecation_reason=self.deprecation_reason,
out_name=self.out_name,
extensions=self... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 698 | 707 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,320 | __copy__ | def __copy__(self) -> "GraphQLArgument": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 709 | 710 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,321 | is_required_argument | def is_required_argument(arg: GraphQLArgument) -> bool:
return is_non_null_type(arg.type) and arg.default_value is Undefined | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 713 | 714 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,322 | __init__ | def __init__(
self,
name: str,
fields: ThunkMapping[GraphQLField],
interfaces: Optional[ThunkCollection["GraphQLInterfaceType"]] = None,
is_type_of: Optional[GraphQLIsTypeOfFn] = None,
extensions: Optional[Dict[str, Any]] = None,
description: Optional[str] = None,... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 756 | 790 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,323 | to_kwargs | def to_kwargs(self) -> GraphQLObjectTypeKwargs:
# noinspection PyArgumentList
return GraphQLObjectTypeKwargs( # type: ignore
super().to_kwargs(),
fields=self.fields.copy(),
interfaces=self.interfaces,
is_type_of=self.is_type_of,
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 792 | 799 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,324 | __copy__ | def __copy__(self) -> "GraphQLObjectType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 801 | 802 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,325 | fields | def fields(self) -> GraphQLFieldMap:
"""Get provided fields, wrapping them as GraphQLFields if needed."""
try:
fields = resolve_thunk(self._fields)
except Exception as error:
cls = GraphQLError if isinstance(error, GraphQLError) else TypeError
raise cls(f"{sel... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 805 | 831 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,326 | interfaces | def interfaces(self) -> Tuple["GraphQLInterfaceType", ...]:
"""Get provided interfaces."""
try:
interfaces: Collection["GraphQLInterfaceType"] = resolve_thunk(
self._interfaces # type: ignore
)
except Exception as error:
cls = GraphQLError if ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 834 | 852 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,327 | is_object_type | def is_object_type(type_: Any) -> bool:
return isinstance(type_, GraphQLObjectType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 855 | 856 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,328 | assert_object_type | def assert_object_type(type_: Any) -> GraphQLObjectType:
if not is_object_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Object type.")
return cast(GraphQLObjectType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 859 | 862 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,329 | __init__ | def __init__(
self,
name: str,
fields: ThunkMapping[GraphQLField],
interfaces: Optional[ThunkCollection["GraphQLInterfaceType"]] = None,
resolve_type: Optional[GraphQLTypeResolver] = None,
description: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = N... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 890 | 924 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,330 | to_kwargs | def to_kwargs(self) -> GraphQLInterfaceTypeKwargs:
# noinspection PyArgumentList
return GraphQLInterfaceTypeKwargs( # type: ignore
super().to_kwargs(),
fields=self.fields.copy(),
interfaces=self.interfaces,
resolve_type=self.resolve_type,
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 926 | 933 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,331 | __copy__ | def __copy__(self) -> "GraphQLInterfaceType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 935 | 936 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,332 | fields | def fields(self) -> GraphQLFieldMap:
"""Get provided fields, wrapping them as GraphQLFields if needed."""
try:
fields = resolve_thunk(self._fields)
except Exception as error:
cls = GraphQLError if isinstance(error, GraphQLError) else TypeError
raise cls(f"{sel... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 939 | 965 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,333 | interfaces | def interfaces(self) -> Tuple["GraphQLInterfaceType", ...]:
"""Get provided interfaces."""
try:
interfaces: Collection["GraphQLInterfaceType"] = resolve_thunk(
self._interfaces # type: ignore
)
except Exception as error:
cls = GraphQLError if ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 968 | 986 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,334 | is_interface_type | def is_interface_type(type_: Any) -> bool:
return isinstance(type_, GraphQLInterfaceType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 989 | 990 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,335 | assert_interface_type | def assert_interface_type(type_: Any) -> GraphQLInterfaceType:
if not is_interface_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Interface type.")
return cast(GraphQLInterfaceType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 993 | 996 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,336 | __init__ | def __init__(
self,
name: str,
types: ThunkCollection[GraphQLObjectType],
resolve_type: Optional[GraphQLTypeResolver] = None,
description: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[UnionTypeDefinitionNode] = None,
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,026 | 1,058 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,337 | to_kwargs | def to_kwargs(self) -> GraphQLUnionTypeKwargs:
# noinspection PyArgumentList
return GraphQLUnionTypeKwargs( # type: ignore
super().to_kwargs(), types=self.types, resolve_type=self.resolve_type
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,060 | 1,064 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,338 | __copy__ | def __copy__(self) -> "GraphQLUnionType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,066 | 1,067 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,339 | types | def types(self) -> Tuple[GraphQLObjectType, ...]:
"""Get provided types."""
try:
types: Collection[GraphQLObjectType] = resolve_thunk(self._types)
except Exception as error:
cls = GraphQLError if isinstance(error, GraphQLError) else TypeError
raise cls(f"{self... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,070 | 1,086 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,340 | is_union_type | def is_union_type(type_: Any) -> bool:
return isinstance(type_, GraphQLUnionType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,089 | 1,090 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,341 | assert_union_type | def assert_union_type(type_: Any) -> GraphQLUnionType:
if not is_union_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Union type.")
return cast(GraphQLUnionType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,093 | 1,096 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,342 | __init__ | def __init__(
self,
name: str,
values: Union[GraphQLEnumValueMap, Mapping[str, Any], Type[Enum]],
names_as_values: Optional[bool] = False,
description: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[EnumTypeDefinitionNode] = ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,145 | 1,198 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,343 | to_kwargs | def to_kwargs(self) -> GraphQLEnumTypeKwargs:
# noinspection PyArgumentList
return GraphQLEnumTypeKwargs( # type: ignore
super().to_kwargs(), values=self.values.copy()
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,200 | 1,204 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,344 | __copy__ | def __copy__(self) -> "GraphQLEnumType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,206 | 1,207 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,345 | _value_lookup | def _value_lookup(self) -> Dict[Any, str]:
# use first value or name as lookup
lookup: Dict[Any, str] = {}
for name, enum_value in self.values.items():
value = enum_value.value
if value is None or value is Undefined:
value = name
try:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,210 | 1,222 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,346 | serialize | def serialize(self, output_value: Any) -> str:
try:
return self._value_lookup[output_value]
except KeyError: # hashable value not found
pass
except TypeError: # unhashable value, we need to scan all values
for enum_name, enum_value in self.values.items():
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,224 | 1,235 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,347 | parse_value | def parse_value(self, input_value: str) -> Any:
if isinstance(input_value, str):
try:
enum_value = self.values[input_value]
except KeyError:
raise GraphQLError(
f"Value '{input_value}' does not exist in '{self.name}' enum."
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,237 | 1,251 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,348 | parse_literal | def parse_literal(
self, value_node: ValueNode, _variables: Optional[Dict[str, Any]] = None
) -> Any:
# Note: variables will be resolved before calling this method.
if isinstance(value_node, EnumValueNode):
try:
enum_value = self.values[value_node.value]
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,253 | 1,273 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,349 | is_enum_type | def is_enum_type(type_: Any) -> bool:
return isinstance(type_, GraphQLEnumType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,276 | 1,277 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,350 | assert_enum_type | def assert_enum_type(type_: Any) -> GraphQLEnumType:
if not is_enum_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Enum type.")
return cast(GraphQLEnumType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,280 | 1,283 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,351 | did_you_mean_enum_value | def did_you_mean_enum_value(enum_type: GraphQLEnumType, unknown_value_str: str) -> str:
suggested_values = suggestion_list(unknown_value_str, enum_type.values)
return did_you_mean(suggested_values, "the enum value") | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,286 | 1,288 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,352 | __init__ | def __init__(
self,
value: Any = None,
description: Optional[str] = None,
deprecation_reason: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[EnumValueDefinitionNode] = None,
) -> None:
if description is not None and not i... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,307 | 1,335 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,353 | __eq__ | def __eq__(self, other: Any) -> bool:
return self is other or (
isinstance(other, GraphQLEnumValue)
and self.value == other.value
and self.description == other.description
and self.deprecation_reason == other.deprecation_reason
and self.extensions == o... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,337 | 1,344 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,354 | to_kwargs | def to_kwargs(self) -> GraphQLEnumValueKwargs:
return GraphQLEnumValueKwargs(
value=self.value,
description=self.description,
deprecation_reason=self.deprecation_reason,
extensions=self.extensions,
ast_node=self.ast_node,
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,346 | 1,353 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,355 | __copy__ | def __copy__(self) -> "GraphQLEnumValue": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,355 | 1,356 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,356 | __init__ | def __init__(
self,
name: str,
fields: ThunkMapping["GraphQLInputField"],
description: Optional[str] = None,
out_type: Optional[GraphQLInputFieldOutType] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[InputObjectTypeDefinitionNode] = None,... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,396 | 1,429 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,357 | out_type | def out_type(value: Dict[str, Any]) -> Any:
"""Transform outbound values (this is an extension of GraphQL.js).
This default implementation passes values unaltered as dictionaries.
"""
return value | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,432 | 1,437 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,358 | to_kwargs | def to_kwargs(self) -> GraphQLInputObjectTypeKwargs:
# noinspection PyArgumentList
return GraphQLInputObjectTypeKwargs( # type: ignore
super().to_kwargs(),
fields=self.fields.copy(),
out_type=None
if self.out_type is GraphQLInputObjectType.out_type
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,439 | 1,447 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,359 | __copy__ | def __copy__(self) -> "GraphQLInputObjectType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,449 | 1,450 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,360 | fields | def fields(self) -> GraphQLInputFieldMap:
"""Get provided fields, wrap them as GraphQLInputField if needed."""
try:
fields = resolve_thunk(self._fields)
except Exception as error:
cls = GraphQLError if isinstance(error, GraphQLError) else TypeError
raise cls(f... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,453 | 1,480 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,361 | is_input_object_type | def is_input_object_type(type_: Any) -> bool:
return isinstance(type_, GraphQLInputObjectType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,483 | 1,484 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,362 | assert_input_object_type | def assert_input_object_type(type_: Any) -> GraphQLInputObjectType:
if not is_input_object_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Input Object type.")
return cast(GraphQLInputObjectType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,487 | 1,490 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,363 | __init__ | def __init__(
self,
type_: "GraphQLInputType",
default_value: Any = Undefined,
description: Optional[str] = None,
deprecation_reason: Optional[str] = None,
out_name: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[Inpu... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,514 | 1,548 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,364 | __eq__ | def __eq__(self, other: Any) -> bool:
return self is other or (
isinstance(other, GraphQLInputField)
and self.type == other.type
and self.default_value == other.default_value
and self.description == other.description
and self.deprecation_reason == othe... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,550 | 1,559 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,365 | to_kwargs | def to_kwargs(self) -> GraphQLInputFieldKwargs:
return GraphQLInputFieldKwargs(
type_=self.type,
default_value=self.default_value,
description=self.description,
deprecation_reason=self.deprecation_reason,
out_name=self.out_name,
extensions=... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,561 | 1,570 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,366 | __copy__ | def __copy__(self) -> "GraphQLInputField": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,572 | 1,573 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,367 | is_required_input_field | def is_required_input_field(field: GraphQLInputField) -> bool:
return is_non_null_type(field.type) and field.default_value is Undefined | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,576 | 1,577 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,368 | __init__ | def __init__(self, type_: GT) -> None:
super().__init__(type_=type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,602 | 1,603 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,369 | __str__ | def __str__(self) -> str:
return f"[{self.of_type}]" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,605 | 1,606 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,370 | is_list_type | def is_list_type(type_: Any) -> bool:
return isinstance(type_, GraphQLList) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,609 | 1,610 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,371 | assert_list_type | def assert_list_type(type_: Any) -> GraphQLList:
if not is_list_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL List type.")
return cast(GraphQLList, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,613 | 1,616 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,372 | __init__ | def __init__(self, type_: GNT):
super().__init__(type_=type_)
if isinstance(type_, GraphQLNonNull):
raise TypeError(
"Can only create NonNull of a Nullable GraphQLType but got:"
f" {type_}."
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,642 | 1,648 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,373 | __str__ | def __str__(self) -> str:
return f"{self.of_type}!" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,650 | 1,651 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,374 | is_non_null_type | def is_non_null_type(type_: Any) -> bool:
return isinstance(type_, GraphQLNonNull) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,654 | 1,655 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,375 | assert_non_null_type | def assert_non_null_type(type_: Any) -> GraphQLNonNull:
if not is_non_null_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL Non-Null type.")
return cast(GraphQLNonNull, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,658 | 1,661 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,376 | is_nullable_type | def is_nullable_type(type_: Any) -> bool:
return isinstance(type_, graphql_nullable_types) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,687 | 1,688 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,377 | assert_nullable_type | def assert_nullable_type(type_: Any) -> GraphQLNullableType:
if not is_nullable_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL nullable type.")
return cast(GraphQLNullableType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,691 | 1,694 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,378 | get_nullable_type | def get_nullable_type(type_: None) -> None:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,698 | 1,699 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,379 | get_nullable_type | def get_nullable_type(type_: GraphQLNullableType) -> GraphQLNullableType:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,703 | 1,704 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,380 | get_nullable_type | def get_nullable_type(type_: GraphQLNonNull) -> GraphQLNullableType:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,708 | 1,709 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,381 | get_nullable_type | def get_nullable_type(
type_: Optional[Union[GraphQLNullableType, GraphQLNonNull]]
) -> Optional[GraphQLNullableType]:
"""Unwrap possible non-null type"""
if is_non_null_type(type_):
type_ = cast(GraphQLNonNull, type_)
type_ = type_.of_type
return cast(Optional[GraphQLNullableType], type... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,712 | 1,719 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,382 | is_input_type | def is_input_type(type_: Any) -> bool:
return isinstance(type_, graphql_input_types) or (
isinstance(type_, GraphQLWrappingType) and is_input_type(type_.of_type)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,731 | 1,734 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,383 | assert_input_type | def assert_input_type(type_: Any) -> GraphQLInputType:
if not is_input_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL input type.")
return cast(GraphQLInputType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,737 | 1,740 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,384 | is_output_type | def is_output_type(type_: Any) -> bool:
return isinstance(type_, graphql_output_types) or (
isinstance(type_, GraphQLWrappingType) and is_output_type(type_.of_type)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,763 | 1,766 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,385 | assert_output_type | def assert_output_type(type_: Any) -> GraphQLOutputType:
if not is_output_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL output type.")
return cast(GraphQLOutputType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,769 | 1,772 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,386 | is_named_type | def is_named_type(type_: Any) -> bool:
return isinstance(type_, GraphQLNamedType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,790 | 1,791 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,387 | assert_named_type | def assert_named_type(type_: Any) -> GraphQLNamedType:
if not is_named_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL named type.")
return cast(GraphQLNamedType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,794 | 1,797 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,388 | get_named_type | def get_named_type(type_: None) -> None:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,801 | 1,802 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,389 | get_named_type | def get_named_type(type_: GraphQLType) -> GraphQLNamedType:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,806 | 1,807 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,390 | get_named_type | def get_named_type(type_: Optional[GraphQLType]) -> Optional[GraphQLNamedType]:
"""Unwrap possible wrapping type"""
if type_:
unwrapped_type = type_
while is_wrapping_type(unwrapped_type):
unwrapped_type = cast(GraphQLWrappingType, unwrapped_type)
unwrapped_type = unwrapp... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,810 | 1,818 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,391 | is_leaf_type | def is_leaf_type(type_: Any) -> bool:
return isinstance(type_, graphql_leaf_types) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,828 | 1,829 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,392 | assert_leaf_type | def assert_leaf_type(type_: Any) -> GraphQLLeafType:
if not is_leaf_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL leaf type.")
return cast(GraphQLLeafType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,832 | 1,835 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,393 | is_composite_type | def is_composite_type(type_: Any) -> bool:
return isinstance(type_, graphql_composite_types) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,845 | 1,846 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,394 | assert_composite_type | def assert_composite_type(type_: Any) -> GraphQLType:
if not is_composite_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL composite type.")
return cast(GraphQLType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,849 | 1,852 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,395 | is_abstract_type | def is_abstract_type(type_: Any) -> bool:
return isinstance(type_, graphql_abstract_types) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,862 | 1,863 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,396 | assert_abstract_type | def assert_abstract_type(type_: Any) -> GraphQLAbstractType:
if not is_abstract_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL composite type.")
return cast(GraphQLAbstractType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 1,866 | 1,869 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,397 | assert_name | def assert_name(name: str) -> str:
"""Uphold the spec rules about naming."""
if name is None:
raise TypeError("Must provide name.")
if not isinstance(name, str):
raise TypeError("Expected name to be a string.")
if not name:
raise GraphQLError("Expected name to be a non-empty stri... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/assert_name.py | 7 | 21 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,398 | assert_enum_value_name | def assert_enum_value_name(name: str) -> str:
"""Uphold the spec rules about naming enum values."""
assert_name(name)
if name in {"true", "false", "null"}:
raise GraphQLError(f"Enum values cannot be named: {name}.")
return name | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/assert_name.py | 24 | 29 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,399 | serialize_int | def serialize_int(output_value: Any) -> int:
if isinstance(output_value, bool):
return 1 if output_value else 0
try:
if isinstance(output_value, int):
num = output_value
elif isinstance(output_value, float):
num = int(output_value)
if num != output_val... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py | 42 | 66 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,400 | coerce_int | def coerce_int(input_value: Any) -> int:
if not (
isinstance(input_value, int) and not isinstance(input_value, bool)
) and not (
isinstance(input_value, float)
and isfinite(input_value)
and int(input_value) == input_value
):
raise GraphQLError(
"Int cannot... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py | 69 | 85 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.