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,101 | value_from_ast_untyped | def value_from_ast_untyped(
value_node: ValueNode, variables: Optional[Dict[str, Any]] = None
) -> Any:
"""Produce a Python value given a GraphQL Value AST.
Unlike :func:`~graphql.utilities.value_from_ast`, no type is provided.
The resulting Python value will reflect the provided GraphQL value AST.
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 22 | 49 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,102 | value_from_null | def value_from_null(_value_node: NullValueNode, _variables: Any) -> Any:
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 52 | 53 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,103 | value_from_int | def value_from_int(value_node: IntValueNode, _variables: Any) -> Any:
try:
return int(value_node.value)
except ValueError:
return nan | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 56 | 60 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,104 | value_from_float | def value_from_float(value_node: FloatValueNode, _variables: Any) -> Any:
try:
return float(value_node.value)
except ValueError:
return nan | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 63 | 67 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,105 | value_from_string | def value_from_string(
value_node: Union[BooleanValueNode, EnumValueNode, StringValueNode], _variables: Any
) -> Any:
return value_node.value | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 70 | 73 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,106 | value_from_list | def value_from_list(
value_node: ListValueNode, variables: Optional[Dict[str, Any]]
) -> Any:
return [value_from_ast_untyped(node, variables) for node in value_node.values] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 76 | 79 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,107 | value_from_object | def value_from_object(
value_node: ObjectValueNode, variables: Optional[Dict[str, Any]]
) -> Any:
return {
field.name.value: value_from_ast_untyped(field.value, variables)
for field in value_node.fields
} | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 82 | 88 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,108 | value_from_variable | def value_from_variable(
value_node: VariableNode, variables: Optional[Dict[str, Any]]
) -> Any:
variable_name = value_node.name.value
if not variables:
return Undefined
return variables.get(variable_name, Undefined) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast_untyped.py | 91 | 97 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,109 | default_on_error | def default_on_error(
path: List[Union[str, int]], invalid_value: Any, error: GraphQLError
) -> None:
error_prefix = "Invalid value " + inspect(invalid_value)
if path:
error_prefix += f" at 'value{print_path_list(path)}'"
error.message = error_prefix + ": " + error.message
raise error | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/coerce_input_value.py | 32 | 39 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,110 | coerce_input_value | def coerce_input_value(
input_value: Any,
type_: GraphQLInputType,
on_error: OnErrorCB = default_on_error,
path: Optional[Path] = None,
) -> Any:
"""Coerce a Python value given a GraphQL Input Type."""
if is_non_null_type(type_):
if input_value is not None and input_value is not Undefine... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/coerce_input_value.py | 42 | 159 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,111 | value_from_ast | def value_from_ast(
value_node: Optional[ValueNode],
type_: GraphQLInputType,
variables: Optional[Dict[str, Any]] = None,
) -> Any:
"""Produce a Python value given a GraphQL Value AST.
A GraphQL type must be provided, which will be used to interpret different GraphQL
Value literals.
Return... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast.py | 26 | 140 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,112 | is_missing_variable | def is_missing_variable(
value_node: ValueNode, variables: Optional[Dict[str, Any]] = None
) -> bool:
"""Check if ``value_node`` is a variable not defined in the ``variables`` dict."""
return isinstance(value_node, VariableNode) and (
not variables or variables.get(value_node.name.value, Undefined) ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/value_from_ast.py | 143 | 149 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,113 | get_operation_ast | def get_operation_ast(
document_ast: DocumentNode, operation_name: Optional[str] = None
) -> Optional[OperationDefinitionNode]:
"""Get operation AST node.
Returns an operation AST given a document AST and optionally an operation
name. If a name is not provided, an operation is only returned if only one... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/get_operation_ast.py | 8 | 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,114 | is_equal_type | def is_equal_type(type_a: GraphQLType, type_b: GraphQLType) -> bool:
"""Check whether two types are equal.
Provided two types, return true if the types are equal (invariant)."""
# Equivalent types are equal.
if type_a is type_b:
return True
# If either type is non-null, the other must also... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_comparators.py | 21 | 40 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,115 | is_type_sub_type_of | def is_type_sub_type_of(
schema: GraphQLSchema, maybe_subtype: GraphQLType, super_type: GraphQLType
) -> bool:
"""Check whether a type is subtype of another type in a given schema.
Provided a type and a super type, return true if the first type is either equal or
a subset of the second super type (cova... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_comparators.py | 43 | 92 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,116 | do_types_overlap | def do_types_overlap(
schema: GraphQLSchema, type_a: GraphQLCompositeType, type_b: GraphQLCompositeType
) -> bool:
"""Check whether two types overlap in a given schema.
Provided two composite types, determine if they "overlap". Two composite types
overlap when the Sets of possible concrete types for ea... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_comparators.py | 95 | 131 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,117 | build_client_schema | def build_client_schema(
introspection: IntrospectionQuery, assume_valid: bool = False
) -> GraphQLSchema:
"""Build a GraphQLSchema for use by client tools.
Given the result of a client running the introspection query, creates and returns
a GraphQLSchema instance which can be then used with all GraphQL... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 53 | 418 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,118 | get_type | def get_type(type_ref: IntrospectionTypeRef) -> GraphQLType:
kind = type_ref.get("kind")
if kind == TypeKind.LIST.name:
item_ref = type_ref.get("ofType")
if not item_ref:
raise TypeError("Decorated type deeper than introspection query.")
item_ref = cas... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 81 | 97 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,119 | get_named_type | def get_named_type(type_ref: IntrospectionType) -> GraphQLNamedType:
type_name = type_ref.get("name")
if not type_name:
raise TypeError(f"Unknown type reference: {inspect(type_ref)}.")
type_ = type_map.get(type_name)
if not type_:
raise TypeError(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 99 | 111 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,120 | get_object_type | def get_object_type(type_ref: IntrospectionObjectType) -> GraphQLObjectType:
return assert_object_type(get_type(type_ref)) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 113 | 114 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,121 | get_interface_type | def get_interface_type(
type_ref: IntrospectionInterfaceType,
) -> GraphQLInterfaceType:
return assert_interface_type(get_type(type_ref)) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 116 | 119 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,122 | build_type | def build_type(type_: IntrospectionType) -> GraphQLNamedType:
if type_ and "name" in type_ and "kind" in type_:
builder = type_builders.get(type_["kind"])
if builder: # pragma: no cover else
return builder(type_)
raise TypeError(
"Invalid or incomplet... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 122 | 131 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,123 | build_scalar_def | def build_scalar_def(
scalar_introspection: IntrospectionScalarType,
) -> GraphQLScalarType:
return GraphQLScalarType(
name=scalar_introspection["name"],
description=scalar_introspection.get("description"),
specified_by_url=scalar_introspection.get("specifiedByURL... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 133 | 140 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,124 | build_implementations_list | def build_implementations_list(
implementing_introspection: Union[
IntrospectionObjectType, IntrospectionInterfaceType
],
) -> List[GraphQLInterfaceType]:
maybe_interfaces = implementing_introspection.get("interfaces")
if maybe_interfaces is None:
# Temporary ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 142 | 158 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,125 | build_object_def | def build_object_def(
object_introspection: IntrospectionObjectType,
) -> GraphQLObjectType:
return GraphQLObjectType(
name=object_introspection["name"],
description=object_introspection.get("description"),
interfaces=lambda: build_implementations_list(object_intr... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 160 | 168 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,126 | build_interface_def | def build_interface_def(
interface_introspection: IntrospectionInterfaceType,
) -> GraphQLInterfaceType:
return GraphQLInterfaceType(
name=interface_introspection["name"],
description=interface_introspection.get("description"),
interfaces=lambda: build_implementat... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 170 | 178 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,127 | build_union_def | def build_union_def(
union_introspection: IntrospectionUnionType,
) -> GraphQLUnionType:
maybe_possible_types = union_introspection.get("possibleTypes")
if maybe_possible_types is None:
raise TypeError(
"Introspection result missing possibleTypes:"
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 180 | 194 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,128 | build_enum_def | def build_enum_def(enum_introspection: IntrospectionEnumType) -> GraphQLEnumType:
if enum_introspection.get("enumValues") is None:
raise TypeError(
"Introspection result missing enumValues:"
f" {inspect(enum_introspection)}."
)
return GraphQLEnumTy... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 196 | 213 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,129 | build_input_object_def | def build_input_object_def(
input_object_introspection: IntrospectionInputObjectType,
) -> GraphQLInputObjectType:
if input_object_introspection.get("inputFields") is None:
raise TypeError(
"Introspection result missing inputFields:"
f" {inspect(input_obje... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 215 | 229 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,130 | build_field_def_map | def build_field_def_map(
type_introspection: Union[IntrospectionObjectType, IntrospectionInterfaceType],
) -> Dict[str, GraphQLField]:
if type_introspection.get("fields") is None:
raise TypeError(
f"Introspection result missing fields: {type_introspection}."
)... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 240 | 250 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,131 | build_field | def build_field(field_introspection: IntrospectionField) -> GraphQLField:
type_introspection = cast(IntrospectionType, field_introspection["type"])
type_ = get_type(type_introspection)
if not is_output_type(type_):
raise TypeError(
"Introspection must provide output t... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 252 | 274 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,132 | build_argument_def_map | def build_argument_def_map(
argument_value_introspections: Collection[IntrospectionInputValue],
) -> Dict[str, GraphQLArgument]:
return {
argument_introspection["name"]: build_argument(argument_introspection)
for argument_introspection in argument_value_introspections
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 276 | 282 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,133 | build_argument | def build_argument(
argument_introspection: IntrospectionInputValue,
) -> GraphQLArgument:
type_introspection = cast(IntrospectionType, argument_introspection["type"])
type_ = get_type(type_introspection)
if not is_input_type(type_):
raise TypeError(
"Intr... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 284 | 307 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,134 | build_input_value_def_map | def build_input_value_def_map(
input_value_introspections: Collection[IntrospectionInputValue],
) -> Dict[str, GraphQLInputField]:
return {
input_value_introspection["name"]: build_input_value(
input_value_introspection
)
for input_value_introspect... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 309 | 317 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,135 | build_input_value | def build_input_value(
input_value_introspection: IntrospectionInputValue,
) -> GraphQLInputField:
type_introspection = cast(IntrospectionType, input_value_introspection["type"])
type_ = get_type(type_introspection)
if not is_input_type(type_):
raise TypeError(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 319 | 342 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,136 | build_directive | def build_directive(
directive_introspection: IntrospectionDirective,
) -> GraphQLDirective:
if directive_introspection.get("args") is None:
raise TypeError(
"Introspection result missing directive args:"
f" {inspect(directive_introspection)}."
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_client_schema.py | 344 | 368 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,137 | strip_ignored_characters | def strip_ignored_characters(source: Union[str, Source]) -> str:
"""Strip characters that are ignored anyway.
Strips characters that are not significant to the validity or execution
of a GraphQL document:
- UnicodeBOM
- WhiteSpace
- LineTerminator
- Comment
- Comma
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/strip_ignored_characters.py | 11 | 96 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,138 | ast_to_dict | def ast_to_dict(
node: Node, locations: bool = False, cache: Optional[Dict[Node, Any]] = None
) -> Dict:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/ast_to_dict.py | 11 | 14 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,139 | ast_to_dict | def ast_to_dict(
node: Collection[Node],
locations: bool = False,
cache: Optional[Dict[Node, Any]] = None,
) -> List[Node]:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/ast_to_dict.py | 18 | 23 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,140 | ast_to_dict | def ast_to_dict(
node: OperationType,
locations: bool = False,
cache: Optional[Dict[Node, Any]] = None,
) -> str:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/ast_to_dict.py | 27 | 32 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,141 | ast_to_dict | def ast_to_dict(
node: Any, locations: bool = False, cache: Optional[Dict[Node, Any]] = None
) -> Any:
"""Convert a language AST to a nested Python dictionary.
Set `location` to True in order to get the locations as well.
"""
"""Convert a node to a nested Python dictionary."""
if isinstance(no... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/ast_to_dict.py | 35 | 65 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,142 | find_breaking_changes | def find_breaking_changes(
old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[BreakingChange]:
"""Find breaking changes.
Given two schemas, returns a list containing descriptions of all the types of
breaking changes covered by the other functions down below.
"""
return [
cha... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 85 | 97 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,143 | find_dangerous_changes | def find_dangerous_changes(
old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[DangerousChange]:
"""Find dangerous changes.
Given two schemas, returns a list containing descriptions of all the types of
potentially dangerous changes covered by the other functions down below.
"""
retu... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 100 | 112 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,144 | find_schema_changes | def find_schema_changes(
old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[Change]:
return find_type_changes(old_schema, new_schema) + find_directive_changes(
old_schema, new_schema
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 115 | 120 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,145 | find_directive_changes | def find_directive_changes(
old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[Change]:
schema_changes: List[Change] = []
directives_diff = list_diff(old_schema.directives, new_schema.directives)
for directive in directives_diff.removed:
schema_changes.append(
BreakingC... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 123 | 175 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,146 | find_type_changes | def find_type_changes(
old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[Change]:
schema_changes: List[Change] = []
types_diff = dict_diff(old_schema.type_map, new_schema.type_map)
for type_name, old_type in types_diff.removed.items():
schema_changes.append(
BreakingCha... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 178 | 221 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,147 | find_input_object_type_changes | def find_input_object_type_changes(
old_type: Union[GraphQLObjectType, GraphQLInterfaceType],
new_type: Union[GraphQLObjectType, GraphQLInterfaceType],
) -> List[Change]:
schema_changes: List[Change] = []
fields_diff = dict_diff(old_type.fields, new_type.fields)
for field_name, new_field in fields_... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 224 | 270 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,148 | find_union_type_changes | def find_union_type_changes(
old_type: GraphQLUnionType, new_type: GraphQLUnionType
) -> List[Change]:
schema_changes: List[Change] = []
possible_types_diff = list_diff(old_type.types, new_type.types)
for possible_type in possible_types_diff.added:
schema_changes.append(
DangerousCh... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 273 | 295 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,149 | find_enum_type_changes | def find_enum_type_changes(
old_type: GraphQLEnumType, new_type: GraphQLEnumType
) -> List[Change]:
schema_changes: List[Change] = []
values_diff = dict_diff(old_type.values, new_type.values)
for value_name in values_diff.added:
schema_changes.append(
DangerousChange(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 298 | 320 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,150 | find_implemented_interfaces_changes | def find_implemented_interfaces_changes(
old_type: Union[GraphQLObjectType, GraphQLInterfaceType],
new_type: Union[GraphQLObjectType, GraphQLInterfaceType],
) -> List[Change]:
schema_changes: List[Change] = []
interfaces_diff = list_diff(old_type.interfaces, new_type.interfaces)
for interface in in... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 323 | 346 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,151 | find_field_changes | def find_field_changes(
old_type: Union[GraphQLObjectType, GraphQLInterfaceType],
new_type: Union[GraphQLObjectType, GraphQLInterfaceType],
) -> List[Change]:
schema_changes: List[Change] = []
fields_diff = dict_diff(old_type.fields, new_type.fields)
for field_name in fields_diff.removed:
s... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 349 | 380 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,152 | find_arg_changes | def find_arg_changes(
old_type: Union[GraphQLObjectType, GraphQLInterfaceType],
field_name: str,
old_field: GraphQLField,
new_field: GraphQLField,
) -> List[Change]:
schema_changes: List[Change] = []
args_diff = dict_diff(old_field.args, new_field.args)
for arg_name in args_diff.removed:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 383 | 457 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,153 | is_change_safe_for_object_or_interface_field | def is_change_safe_for_object_or_interface_field(
old_type: GraphQLType, new_type: GraphQLType
) -> bool:
if is_list_type(old_type):
return (
# if they're both lists, make sure underlying types are compatible
is_list_type(new_type)
and is_change_safe_for_object_or_int... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 460 | 498 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,154 | is_change_safe_for_input_object_field_or_field_arg | def is_change_safe_for_input_object_field_or_field_arg(
old_type: GraphQLType, new_type: GraphQLType
) -> bool:
if is_list_type(old_type):
return is_list_type(
# if they're both lists, make sure underlying types are compatible
new_type
) and is_change_safe_for_input_obje... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 501 | 534 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,155 | type_kind_name | def type_kind_name(type_: GraphQLNamedType) -> str:
if is_scalar_type(type_):
return "a Scalar type"
if is_object_type(type_):
return "an Object type"
if is_interface_type(type_):
return "an Interface type"
if is_union_type(type_):
return "a Union type"
if is_enum_typ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 537 | 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,156 | stringify_value | def stringify_value(value: Any, type_: GraphQLInputType) -> str:
ast = ast_from_value(value, type_)
if ast is None: # pragma: no cover
raise TypeError(f"Invalid value: {inspect(value)}")
return print_ast(sort_value_node(ast)) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 555 | 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,157 | list_diff | def list_diff(old_list: Collection, new_list: Collection) -> ListDiff:
"""Get differences between two lists of named items."""
added = []
persisted = []
removed = []
old_set = {item.name for item in old_list}
new_map = {item.name: item for item in new_list}
for old_item in old_list:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 570 | 590 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,158 | dict_diff | def dict_diff(old_dict: Dict, new_dict: Dict) -> DictDiff:
"""Get differences between two dicts."""
added = {}
removed = {}
persisted = {}
for old_name, old_item in old_dict.items():
new_item = new_dict.get(old_name)
if new_item:
persisted[old_name] = [old_item, new_item... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/find_breaking_changes.py | 601 | 618 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,159 | get_introspection_query | def get_introspection_query(
descriptions: bool = True,
specified_by_url: bool = False,
directive_is_repeatable: bool = False,
schema_description: bool = False,
input_value_deprecation: bool = False,
) -> str:
"""Get a query for introspection.
Optionally, you can exclude descriptions, inclu... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/get_introspection_query.py | 31 | 151 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,160 | input_deprecation | def input_deprecation(string: str) -> Optional[str]:
return string if input_value_deprecation else "" | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/get_introspection_query.py | 49 | 50 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,161 | build_ast_schema | def build_ast_schema(
document_ast: DocumentNode,
assume_valid: bool = False,
assume_valid_sdl: bool = False,
) -> GraphQLSchema:
"""Build a GraphQL Schema from a given AST.
This takes the ast of a schema document produced by the parse function in
src/language/parser.py.
If no schema defin... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_ast_schema.py | 18 | 84 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,162 | build_schema | def build_schema(
source: Union[str, Source],
assume_valid: bool = False,
assume_valid_sdl: bool = False,
no_location: bool = False,
allow_legacy_fragment_variables: bool = False,
) -> GraphQLSchema:
"""Build a GraphQLSchema directly from a source document."""
return build_ast_schema(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/build_ast_schema.py | 87 | 103 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,163 | concat_ast | def concat_ast(asts: Collection[DocumentNode]) -> DocumentNode:
"""Concat ASTs.
Provided a collection of ASTs, presumably each from different files, concatenate
the ASTs together into batched AST, useful for validating many GraphQL source files
which together represent one conceptual application.
"... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/concat_ast.py | 9 | 18 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,164 | extend_schema | def extend_schema(
schema: GraphQLSchema,
document_ast: DocumentNode,
assume_valid: bool = False,
assume_valid_sdl: bool = False,
) -> GraphQLSchema:
"""Extend the schema with extensions from a given document.
Produces a new schema given an existing schema and a document which may contain
G... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 94 | 131 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,165 | extend_schema_impl | def extend_schema_impl(
schema_kwargs: GraphQLSchemaKwargs,
document_ast: DocumentNode,
assume_valid: bool = False,
) -> GraphQLSchemaKwargs:
"""Extend the given schema arguments with extensions from a given document.
For internal use only.
"""
# Note: schema_kwargs should become a TypedDic... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 134 | 672 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,166 | replace_type | def replace_type(type_: GraphQLType) -> GraphQLType:
if is_list_type(type_):
return GraphQLList(replace_type(type_.of_type)) # type: ignore
if is_non_null_type(type_):
return GraphQLNonNull(replace_type(type_.of_type)) # type: ignore
return replace_named_type(type_) # ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 185 | 190 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,167 | replace_named_type | def replace_named_type(type_: GraphQLNamedType) -> GraphQLNamedType:
# Note: While this could make early assertions to get the correctly
# typed values below, that would throw immediately while type system
# validation with validate_schema() will produce more actionable results.
return t... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 192 | 196 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,168 | replace_directive | def replace_directive(directive: GraphQLDirective) -> GraphQLDirective:
kwargs = directive.to_kwargs()
return GraphQLDirective(
**merge_kwargs(
kwargs,
args={name: extend_arg(arg) for name, arg in kwargs["args"].items()},
)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 199 | 206 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,169 | extend_named_type | def extend_named_type(type_: GraphQLNamedType) -> GraphQLNamedType:
if is_introspection_type(type_) or is_specified_scalar_type(type_):
# Builtin types are not extended.
return type_
if is_scalar_type(type_):
type_ = cast(GraphQLScalarType, type_)
return e... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 208 | 232 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,170 | extend_input_object_type | def extend_input_object_type(
type_: GraphQLInputObjectType,
) -> GraphQLInputObjectType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
return GraphQLInputObjectType(
**merge_kwargs(
kwargs,
fields=lamb... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 235 | 258 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,171 | extend_enum_type | def extend_enum_type(type_: GraphQLEnumType) -> GraphQLEnumType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
return GraphQLEnumType(
**merge_kwargs(
kwargs,
values={**kwargs["values"], **build_enum_value_map(exte... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 260 | 270 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,172 | extend_scalar_type | def extend_scalar_type(type_: GraphQLScalarType) -> GraphQLScalarType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
specified_by_url = kwargs["specified_by_url"]
for extension_node in extensions:
specified_by_url = get_specified_by_url(e... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 272 | 286 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,173 | extend_object_type | def extend_object_type(type_: GraphQLObjectType) -> GraphQLObjectType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
return GraphQLObjectType(
**merge_kwargs(
kwargs,
interfaces=lambda: [
cast(G... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 289 | 310 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,174 | extend_interface_type | def extend_interface_type(type_: GraphQLInterfaceType) -> GraphQLInterfaceType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
return GraphQLInterfaceType(
**merge_kwargs(
kwargs,
interfaces=lambda: [
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 313 | 334 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,175 | extend_union_type | def extend_union_type(type_: GraphQLUnionType) -> GraphQLUnionType:
kwargs = type_.to_kwargs()
extensions = tuple(type_extensions_map[kwargs["name"]])
return GraphQLUnionType(
**merge_kwargs(
kwargs,
types=lambda: [
cast(GraphQLObj... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 336 | 350 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,176 | extend_field | def extend_field(field: GraphQLField) -> GraphQLField:
return GraphQLField(
**merge_kwargs(
field.to_kwargs(),
type_=replace_type(field.type),
args={name: extend_arg(arg) for name, arg in field.args.items()},
)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 353 | 360 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,177 | extend_arg | def extend_arg(arg: GraphQLArgument) -> GraphQLArgument:
return GraphQLArgument(
**merge_kwargs(
arg.to_kwargs(),
type_=replace_type(arg.type),
)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 362 | 368 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,178 | get_operation_types | def get_operation_types(
nodes: Collection[Union[SchemaDefinitionNode, SchemaExtensionNode]]
) -> Dict[OperationType, GraphQLNamedType]:
# Note: While this could make early assertions to get the correctly
# typed values below, that would throw immediately while type system
# validati... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 371 | 381 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,179 | get_named_type | def get_named_type(node: NamedTypeNode) -> GraphQLNamedType:
name = node.name.value
type_ = std_type_map.get(name) or type_map.get(name)
if not type_:
raise TypeError(f"Unknown type: '{name}'.")
return type_ | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 384 | 390 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,180 | get_wrapped_type | def get_wrapped_type(node: TypeNode) -> GraphQLType:
if isinstance(node, ListTypeNode):
return GraphQLList(get_wrapped_type(node.type))
if isinstance(node, NonNullTypeNode):
return GraphQLNonNull(
cast(GraphQLNullableType, get_wrapped_type(node.type))
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 392 | 399 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,181 | build_directive | def build_directive(node: DirectiveDefinitionNode) -> GraphQLDirective:
locations = [DirectiveLocation[node.value] for node in node.locations]
return GraphQLDirective(
name=node.name.value,
description=node.description.value if node.description else None,
locations=l... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 401 | 411 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,182 | build_field_map | def build_field_map(
nodes: Collection[
Union[
InterfaceTypeDefinitionNode,
InterfaceTypeExtensionNode,
ObjectTypeDefinitionNode,
ObjectTypeExtensionNode,
]
],
) -> GraphQLFieldMap:
field_map: GraphQLFiel... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 413 | 436 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,183 | build_argument_map | def build_argument_map(
args: Optional[Collection[InputValueDefinitionNode]],
) -> GraphQLArgumentMap:
arg_map: GraphQLArgumentMap = {}
for arg in args or []:
# Note: While this could make assertions to get the correctly typed
# value, that would throw immediately whi... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 438 | 454 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,184 | build_input_field_map | def build_input_field_map(
nodes: Collection[
Union[InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode]
],
) -> GraphQLInputFieldMap:
input_field_map: GraphQLInputFieldMap = {}
for node in nodes:
for field in node.fields or []:
# Note:... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 456 | 475 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,185 | build_enum_value_map | def build_enum_value_map(
nodes: Collection[Union[EnumTypeDefinitionNode, EnumTypeExtensionNode]]
) -> GraphQLEnumValueMap:
enum_value_map: GraphQLEnumValueMap = {}
for node in nodes:
for value in node.values or []:
# Note: While this could make assertions to get ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 477 | 493 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,186 | build_interfaces | def build_interfaces(
nodes: Collection[
Union[
InterfaceTypeDefinitionNode,
InterfaceTypeExtensionNode,
ObjectTypeDefinitionNode,
ObjectTypeExtensionNode,
]
],
) -> List[GraphQLInterfaceType]:
interfaces... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 495 | 512 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,187 | build_union_types | def build_union_types(
nodes: Collection[Union[UnionTypeDefinitionNode, UnionTypeExtensionNode]],
) -> List[GraphQLObjectType]:
types: List[GraphQLObjectType] = []
for node in nodes:
for type_ in node.types or []:
# Note: While this could make assertions to get th... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 514 | 524 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,188 | build_object_type | def build_object_type(ast_node: ObjectTypeDefinitionNode) -> GraphQLObjectType:
extension_nodes = type_extensions_map[ast_node.name.value]
all_nodes: List[Union[ObjectTypeDefinitionNode, ObjectTypeExtensionNode]] = [
ast_node,
*extension_nodes,
]
return GraphQLObj... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 526 | 539 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,189 | build_interface_type | def build_interface_type(
ast_node: InterfaceTypeDefinitionNode,
) -> GraphQLInterfaceType:
extension_nodes = type_extensions_map[ast_node.name.value]
all_nodes: List[
Union[InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode]
] = [ast_node, *extension_nodes]
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 541 | 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,190 | build_enum_type | def build_enum_type(ast_node: EnumTypeDefinitionNode) -> GraphQLEnumType:
extension_nodes = type_extensions_map[ast_node.name.value]
all_nodes: List[Union[EnumTypeDefinitionNode, EnumTypeExtensionNode]] = [
ast_node,
*extension_nodes,
]
return GraphQLEnumType(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 557 | 569 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,191 | build_union_type | def build_union_type(ast_node: UnionTypeDefinitionNode) -> GraphQLUnionType:
extension_nodes = type_extensions_map[ast_node.name.value]
all_nodes: List[Union[UnionTypeDefinitionNode, UnionTypeExtensionNode]] = [
ast_node,
*extension_nodes,
]
return GraphQLUnionTyp... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 571 | 583 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,192 | build_scalar_type | def build_scalar_type(ast_node: ScalarTypeDefinitionNode) -> GraphQLScalarType:
extension_nodes = type_extensions_map[ast_node.name.value]
return GraphQLScalarType(
name=ast_node.name.value,
description=ast_node.description.value if ast_node.description else None,
spe... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 585 | 593 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,193 | build_input_object_type | def build_input_object_type(
ast_node: InputObjectTypeDefinitionNode,
) -> GraphQLInputObjectType:
extension_nodes = type_extensions_map[ast_node.name.value]
all_nodes: List[
Union[InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode]
] = [ast_node, *extension_node... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 595 | 608 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,194 | build_type | def build_type(ast_node: TypeDefinitionNode) -> GraphQLNamedType:
try:
# object_type_definition_node is built with _build_object_type etc.
build_function = build_type_for_kind[ast_node.kind]
except KeyError: # pragma: no cover
# Not reachable. All possible type defin... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 622 | 632 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,195 | get_deprecation_reason | def get_deprecation_reason(
node: Union[EnumValueDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode]
) -> Optional[str]:
"""Given a field or enum value node, get deprecation reason as string."""
from ..execution import get_directive_values
deprecated = get_directive_values(GraphQLDeprecatedD... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 681 | 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,196 | get_specified_by_url | def get_specified_by_url(
node: Union[ScalarTypeDefinitionNode, ScalarTypeExtensionNode]
) -> Optional[str]:
"""Given a scalar node, return the string value for the specifiedByURL."""
from ..execution import get_directive_values
specified_by_url = get_directive_values(GraphQLSpecifiedByDirective, node)... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/extend_schema.py | 691 | 698 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,197 | separate_operations | def separate_operations(document_ast: DocumentNode) -> Dict[str, DocumentNode]:
"""Separate operations in a given AST document.
This function accepts a single AST document which may contain many operations and
fragments and returns a collection of AST documents each of which contains a single
operation... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/separate_operations.py | 19 | 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,198 | collect_transitive_dependencies | def collect_transitive_dependencies(
collected: Set[str], dep_graph: DepGraph, from_name: str
) -> None:
"""Collect transitive dependencies.
From a dependency graph, collects a list of transitive dependencies by recursing
through a dependency graph.
"""
if from_name not in collected:
co... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/separate_operations.py | 69 | 83 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,199 | __init__ | def __init__(self) -> None:
super().__init__()
self.dependencies = []
self.add_dependency = self.dependencies.append | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/separate_operations.py | 89 | 92 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,200 | enter_fragment_spread | def enter_fragment_spread(self, node: FragmentSpreadNode, *_args: Any) -> None:
self.add_dependency(node.name.value) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/separate_operations.py | 94 | 95 | {
"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.