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,201 | collect_dependencies | def collect_dependencies(selection_set: SelectionSetNode) -> List[str]:
collector = DependencyCollector()
visit(selection_set, collector)
return collector.dependencies | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/separate_operations.py | 98 | 101 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,202 | type_from_ast | def type_from_ast(
schema: GraphQLSchema, type_node: NamedTypeNode
) -> Optional[GraphQLNamedType]:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_from_ast.py | 18 | 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,203 | type_from_ast | def type_from_ast(
schema: GraphQLSchema, type_node: ListTypeNode
) -> Optional[GraphQLList]:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_from_ast.py | 25 | 28 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,204 | type_from_ast | def type_from_ast(
schema: GraphQLSchema, type_node: NonNullTypeNode
) -> Optional[GraphQLNonNull]:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_from_ast.py | 32 | 35 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,205 | type_from_ast | def type_from_ast(schema: GraphQLSchema, type_node: TypeNode) -> Optional[GraphQLType]:
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_from_ast.py | 39 | 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,206 | type_from_ast | def type_from_ast(
schema: GraphQLSchema,
type_node: TypeNode,
) -> Optional[GraphQLType]:
"""Get the GraphQL type definition from an AST node.
Given a Schema and an AST node describing a type, return a GraphQLType definition
which applies to that type. For example, if provided the parsed AST node ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_from_ast.py | 43 | 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,207 | get_operation_root_type | def get_operation_root_type(
schema: GraphQLSchema,
operation: Union[OperationDefinitionNode, OperationTypeDefinitionNode],
) -> GraphQLObjectType:
"""Extract the root type of the operation from the schema.
.. deprecated:: 3.2
Please use `GraphQLSchema.getRootType` instead. Will be removed in v3... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/get_operation_root_type.py | 14 | 46 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,208 | print_schema | def print_schema(schema: GraphQLSchema) -> str:
return print_filtered_schema(
schema, lambda n: not is_specified_directive(n), is_defined_type
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 35 | 38 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,209 | print_introspection_schema | def print_introspection_schema(schema: GraphQLSchema) -> str:
return print_filtered_schema(schema, is_specified_directive, is_introspection_type) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 41 | 42 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,210 | is_defined_type | def is_defined_type(type_: GraphQLNamedType) -> bool:
return not is_specified_scalar_type(type_) and not is_introspection_type(type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 45 | 46 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,211 | print_filtered_schema | def print_filtered_schema(
schema: GraphQLSchema,
directive_filter: Callable[[GraphQLDirective], bool],
type_filter: Callable[[GraphQLNamedType], bool],
) -> str:
directives = filter(directive_filter, schema.directives)
types = filter(type_filter, schema.type_map.values())
return "\n\n".join(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 49 | 63 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,212 | print_schema_definition | def print_schema_definition(schema: GraphQLSchema) -> Optional[str]:
if schema.description is None and is_schema_of_common_names(schema):
return None
operation_types = []
query_type = schema.query_type
if query_type:
operation_types.append(f" query: {query_type.name}")
mutation_t... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 66 | 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,213 | is_schema_of_common_names | def is_schema_of_common_names(schema: GraphQLSchema) -> bool:
"""Check whether this schema uses the common naming convention.
GraphQL schema define root types for each type of operation. These types are the
same as any other type and can be named in any manner, however there is a common
naming conventi... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 87 | 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,214 | print_type | def print_type(type_: GraphQLNamedType) -> str:
if is_scalar_type(type_):
type_ = cast(GraphQLScalarType, type_)
return print_scalar(type_)
if is_object_type(type_):
type_ = cast(GraphQLObjectType, type_)
return print_object(type_)
if is_interface_type(type_):
type_ =... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 114 | 135 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,215 | print_scalar | def print_scalar(type_: GraphQLScalarType) -> str:
return (
print_description(type_)
+ f"scalar {type_.name}"
+ print_specified_by_url(type_)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 138 | 143 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,216 | print_implemented_interfaces | def print_implemented_interfaces(
type_: Union[GraphQLObjectType, GraphQLInterfaceType]
) -> str:
interfaces = type_.interfaces
return " implements " + " & ".join(i.name for i in interfaces) if interfaces else "" | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 146 | 150 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,217 | print_object | def print_object(type_: GraphQLObjectType) -> str:
return (
print_description(type_)
+ f"type {type_.name}"
+ print_implemented_interfaces(type_)
+ print_fields(type_)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 153 | 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,218 | print_interface | def print_interface(type_: GraphQLInterfaceType) -> str:
return (
print_description(type_)
+ f"interface {type_.name}"
+ print_implemented_interfaces(type_)
+ print_fields(type_)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 162 | 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,219 | print_union | def print_union(type_: GraphQLUnionType) -> str:
types = type_.types
possible_types = " = " + " | ".join(t.name for t in types) if types else ""
return print_description(type_) + f"union {type_.name}" + possible_types | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 171 | 174 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,220 | print_enum | def print_enum(type_: GraphQLEnumType) -> str:
values = [
print_description(value, " ", not i)
+ f" {name}"
+ print_deprecated(value.deprecation_reason)
for i, (name, value) in enumerate(type_.values.items())
]
return print_description(type_) + f"enum {type_.name}" + print_... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 177 | 184 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,221 | print_input_object | def print_input_object(type_: GraphQLInputObjectType) -> str:
fields = [
print_description(field, " ", not i) + " " + print_input_value(name, field)
for i, (name, field) in enumerate(type_.fields.items())
]
return print_description(type_) + f"input {type_.name}" + print_block(fields) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 187 | 192 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,222 | print_fields | def print_fields(type_: Union[GraphQLObjectType, GraphQLInterfaceType]) -> str:
fields = [
print_description(field, " ", not i)
+ f" {name}"
+ print_args(field.args, " ")
+ f": {field.type}"
+ print_deprecated(field.deprecation_reason)
for i, (name, field) in enume... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 195 | 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,223 | print_block | def print_block(items: List[str]) -> str:
return " {\n" + "\n".join(items) + "\n}" if items else "" | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 207 | 208 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,224 | print_args | def print_args(args: Dict[str, GraphQLArgument], indentation: str = "") -> str:
if not args:
return ""
# If every arg does not have a description, print them on one line.
if not any(arg.description for arg in args.values()):
return (
"("
+ ", ".join(print_input_value... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 211 | 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,225 | print_input_value | def print_input_value(name: str, arg: GraphQLArgument) -> str:
default_ast = ast_from_value(arg.default_value, arg.type)
arg_decl = f"{name}: {arg.type}"
if default_ast:
arg_decl += f" = {print_ast(default_ast)}"
return arg_decl + print_deprecated(arg.deprecation_reason) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 235 | 240 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,226 | print_directive | def print_directive(directive: GraphQLDirective) -> str:
return (
print_description(directive)
+ f"directive @{directive.name}"
+ print_args(directive.args)
+ (" repeatable" if directive.is_repeatable else "")
+ " on "
+ " | ".join(location.name for location in direct... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 243 | 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,227 | print_deprecated | def print_deprecated(reason: Optional[str]) -> str:
if reason is None:
return ""
if reason != DEFAULT_DEPRECATION_REASON:
ast_value = print_ast(StringValueNode(value=reason))
return f" @deprecated(reason: {ast_value})"
return " @deprecated" | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 254 | 260 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,228 | print_specified_by_url | def print_specified_by_url(scalar: GraphQLScalarType) -> str:
if scalar.specified_by_url is None:
return ""
ast_value = print_ast(StringValueNode(value=scalar.specified_by_url))
return f" @specifiedBy(url: {ast_value})" | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 263 | 267 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,229 | print_description | def print_description(
def_: Union[
GraphQLArgument,
GraphQLDirective,
GraphQLEnumValue,
GraphQLNamedType,
GraphQLSchema,
],
indentation: str = "",
first_in_block: bool = True,
) -> str:
description = def_.description
if description is None:
return... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 270 | 293 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,230 | print_value | def print_value(value: Any, type_: GraphQLInputType) -> str:
"""@deprecated: Convenience function for printing a Python value"""
return print_ast(ast_from_value(value, type_)) # type: ignore | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/print_schema.py | 296 | 298 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,231 | validate_schema | def validate_schema(schema: GraphQLSchema) -> List[GraphQLError]:
"""Validate a GraphQL schema.
Implements the "Type Validation" sub-sections of the specification's "Type System"
section.
Validation runs synchronously, returning a list of encountered errors, or an empty
list if no errors were enco... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 52 | 80 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,232 | assert_valid_schema | def assert_valid_schema(schema: GraphQLSchema) -> None:
"""Utility function which asserts a schema is valid.
Throws a TypeError if the schema is invalid.
"""
errors = validate_schema(schema)
if errors:
raise TypeError("\n\n".join(error.message for error in errors)) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 83 | 90 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,233 | __init__ | def __init__(self, schema: GraphQLSchema):
self.errors = []
self.schema = schema | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 99 | 101 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,234 | report_error | def report_error(
self,
message: str,
nodes: Union[Optional[Node], Collection[Optional[Node]]] = None,
) -> None:
if nodes and not isinstance(nodes, Node):
nodes = [node for node in nodes if node]
nodes = cast(Optional[Collection[Node]], nodes)
self.errors... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 103 | 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,235 | validate_root_types | def validate_root_types(self) -> None:
schema = self.schema
query_type = schema.query_type
if not query_type:
self.report_error("Query root type must be provided.", schema.ast_node)
elif not is_object_type(query_type):
self.report_error(
f"Query ro... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 113 | 141 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,236 | validate_directives | def validate_directives(self) -> None:
directives = self.schema.directives
for directive in directives:
# Ensure all directives are in fact GraphQL directives.
if not is_directive(directive):
self.report_error(
f"Expected directive but got: {in... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 143 | 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,237 | validate_name | def validate_name(self, node: Any, name: Optional[str] = None) -> None:
# Ensure names are valid, however introspection types opt out.
try:
if not name:
name = node.name
name = cast(str, name)
ast_node = node.ast_node
except AttributeError: # ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 180 | 195 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,238 | validate_types | def validate_types(self) -> None:
validate_input_object_circular_refs = InputObjectCircularRefsValidator(self)
for type_ in self.schema.type_map.values():
# Ensure all provided types are in fact GraphQL type.
if not is_named_type(type_):
self.report_error(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 197 | 241 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,239 | validate_fields | def validate_fields(
self, type_: Union[GraphQLObjectType, GraphQLInterfaceType]
) -> None:
fields = type_.fields
# Objects and Interfaces both must define one or more fields.
if not fields:
self.report_error(
f"Type {type_.name} must define one or more f... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 243 | 289 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,240 | validate_interfaces | def validate_interfaces(
self, type_: Union[GraphQLObjectType, GraphQLInterfaceType]
) -> None:
iface_type_names: Set[str] = set()
for iface in type_.interfaces:
if not is_interface_type(iface):
self.report_error(
f"Type {type_.name} must only ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 291 | 321 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,241 | validate_type_implements_interface | def validate_type_implements_interface(
self,
type_: Union[GraphQLObjectType, GraphQLInterfaceType],
iface: GraphQLInterfaceType,
) -> None:
type_fields, iface_fields = type_.fields, iface.fields
# Assert each interface field is implemented.
for field_name, iface_fie... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 323 | 400 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,242 | validate_type_implements_ancestors | def validate_type_implements_ancestors(
self,
type_: Union[GraphQLObjectType, GraphQLInterfaceType],
iface: GraphQLInterfaceType,
) -> None:
type_interfaces, iface_interfaces = type_.interfaces, iface.interfaces
for transitive in iface_interfaces:
if transitive no... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 402 | 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,243 | validate_union_members | def validate_union_members(self, union: GraphQLUnionType) -> None:
member_types = union.types
if not member_types:
self.report_error(
f"Union type {union.name} must define one or more member types.",
[union.ast_node, *union.extension_ast_nodes],
)... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 420 | 445 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,244 | validate_enum_values | def validate_enum_values(self, enum_type: GraphQLEnumType) -> None:
enum_values = enum_type.values
if not enum_values:
self.report_error(
f"Enum type {enum_type.name} must define one or more values.",
[enum_type.ast_node, *enum_type.extension_ast_nodes],
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 447 | 458 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,245 | validate_input_fields | def validate_input_fields(self, input_obj: GraphQLInputObjectType) -> None:
fields = input_obj.fields
if not fields:
self.report_error(
f"Input Object type {input_obj.name}"
" must define one or more fields.",
[input_obj.ast_node, *input_obj.e... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 460 | 492 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,246 | get_operation_type_node | def get_operation_type_node(
schema: GraphQLSchema, operation: OperationType
) -> Optional[Node]:
ast_node: Optional[Union[SchemaDefinitionNode, SchemaExtensionNode]]
for ast_node in [schema.ast_node, *(schema.extension_ast_nodes or ())]:
if ast_node:
operation_types = ast_node.operation... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 495 | 506 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,247 | __init__ | def __init__(self, context: SchemaValidationContext):
self.context = context
# Tracks already visited types to maintain O(N) and to ensure that cycles
# are not redundantly reported.
self.visited_types: Set[str] = set()
# Array of input fields used to produce meaningful errors
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 512 | 520 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,248 | __call__ | def __call__(self, input_obj: GraphQLInputObjectType) -> None:
"""Detect cycles recursively."""
# This does a straight-forward DFS to find cycles.
# It does not terminate when a cycle was found but continues to explore
# the graph to find all possible cycles.
name = input_obj.nam... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 522 | 558 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,249 | get_all_implements_interface_nodes | def get_all_implements_interface_nodes(
type_: Union[GraphQLObjectType, GraphQLInterfaceType], iface: GraphQLInterfaceType
) -> List[NamedTypeNode]:
ast_node = type_.ast_node
nodes = type_.extension_ast_nodes
if ast_node is not None:
nodes = [ast_node, *nodes] # type: ignore
implements_node... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 561 | 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,250 | get_union_member_type_nodes | def get_union_member_type_nodes(
union: GraphQLUnionType, type_name: str
) -> List[NamedTypeNode]:
ast_node = union.ast_node
nodes = union.extension_ast_nodes
if ast_node is not None:
nodes = [ast_node, *nodes] # type: ignore
member_type_nodes: List[NamedTypeNode] = []
for node in nodes... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 580 | 596 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,251 | get_deprecated_directive_node | def get_deprecated_directive_node(
definition_node: Optional[Union[InputValueDefinitionNode]],
) -> Optional[DirectiveNode]:
directives = definition_node and definition_node.directives
if directives:
for directive in directives:
if (
directive.name.value == GraphQLDepreca... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/validate.py | 599 | 609 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,252 | __init__ | def __init__(
self,
name: str,
locations: Collection[DirectiveLocation],
args: Optional[Dict[str, GraphQLArgument]] = None,
is_repeatable: bool = False,
description: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[ast.... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 55 | 116 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,253 | __str__ | def __str__(self) -> str:
return f"@{self.name}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 118 | 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,254 | __repr__ | def __repr__(self) -> str:
return f"<{self.__class__.__name__}({self})>" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 121 | 122 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,255 | __eq__ | def __eq__(self, other: Any) -> bool:
return self is other or (
isinstance(other, GraphQLDirective)
and self.name == other.name
and self.locations == other.locations
and self.args == other.args
and self.is_repeatable == other.is_repeatable
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 124 | 133 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,256 | to_kwargs | def to_kwargs(self) -> GraphQLDirectiveKwargs:
return GraphQLDirectiveKwargs(
name=self.name,
locations=self.locations,
args=self.args,
is_repeatable=self.is_repeatable,
description=self.description,
extensions=self.extensions,
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 135 | 144 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,257 | __copy__ | def __copy__(self) -> "GraphQLDirective": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 146 | 147 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,258 | is_directive | def is_directive(directive: Any) -> bool:
"""Test if the given value is a GraphQL directive."""
return isinstance(directive, GraphQLDirective) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 150 | 152 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,259 | assert_directive | def assert_directive(directive: Any) -> GraphQLDirective:
if not is_directive(directive):
raise TypeError(f"Expected {inspect(directive)} to be a GraphQL directive.")
return cast(GraphQLDirective, directive) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 155 | 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,260 | is_specified_directive | def is_specified_directive(directive: GraphQLDirective) -> bool:
"""Check whether the given directive is one of the specified directives."""
return any(
specified_directive.name == directive.name
for specified_directive in specified_directives
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/directives.py | 246 | 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,261 | name | def name(directive, _info):
return directive.name | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 120 | 121 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,262 | description | def description(directive, _info):
return directive.description | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 124 | 125 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,263 | is_repeatable | def is_repeatable(directive, _info):
return directive.is_repeatable | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 128 | 129 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,264 | locations | def locations(directive, _info):
return directive.locations | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 132 | 133 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,265 | args | def args(directive, _info, includeDeprecated=False):
items = directive.args.items()
return (
list(items)
if includeDeprecated
else [item for item in items if item[1].deprecation_reason is None]
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 137 | 143 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,266 | kind | def kind(type_, _info):
if is_scalar_type(type_):
return TypeKind.SCALAR
if is_object_type(type_):
return TypeKind.OBJECT
if is_interface_type(type_):
return TypeKind.INTERFACE
if is_union_type(type_):
return TypeKind.UNION
if is_en... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 291 | 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,267 | name | def name(type_, _info):
return getattr(type_, "name", None) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 313 | 314 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,268 | description | def description(type_, _info):
return getattr(type_, "description", None) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 317 | 318 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,269 | specified_by_url | def specified_by_url(type_, _info):
return getattr(type_, "specified_by_url", None) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 321 | 322 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,270 | fields | def fields(type_, _info, includeDeprecated=False):
if is_object_type(type_) or is_interface_type(type_):
items = type_.fields.items()
return (
list(items)
if includeDeprecated
else [item for item in items if item[1].deprecation_reason is No... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 326 | 333 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,271 | interfaces | def interfaces(type_, _info):
if is_object_type(type_) or is_interface_type(type_):
return type_.interfaces | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 336 | 338 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,272 | possible_types | def possible_types(type_, info):
if is_abstract_type(type_):
return info.schema.get_possible_types(type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 341 | 343 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,273 | enum_values | def enum_values(type_, _info, includeDeprecated=False):
if is_enum_type(type_):
items = type_.values.items()
return (
items
if includeDeprecated
else [item for item in items if item[1].deprecation_reason is None]
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 347 | 354 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,274 | input_fields | def input_fields(type_, _info, includeDeprecated=False):
if is_input_object_type(type_):
items = type_.fields.items()
return (
items
if includeDeprecated
else [item for item in items if item[1].deprecation_reason is None]
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 358 | 365 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,275 | of_type | def of_type(type_, _info):
return getattr(type_, "of_type", None) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 368 | 369 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,276 | name | def name(item, _info):
return item[0] | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 405 | 406 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,277 | description | def description(item, _info):
return item[1].description | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 409 | 410 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,278 | args | def args(item, _info, includeDeprecated=False):
items = item[1].args.items()
return (
items
if includeDeprecated
else [item for item in items if item[1].deprecation_reason is None]
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 414 | 420 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,279 | type | def type(item, _info):
return item[1].type | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 423 | 424 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,280 | is_deprecated | def is_deprecated(item, _info):
return item[1].deprecation_reason is not None | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 427 | 428 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,281 | deprecation_reason | def deprecation_reason(item, _info):
return item[1].deprecation_reason | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 431 | 432 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,282 | name | def name(item, _info):
return item[0] | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 469 | 470 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,283 | description | def description(item, _info):
return item[1].description | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 473 | 474 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,284 | type | def type(item, _info):
return item[1].type | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 477 | 478 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,285 | default_value | def default_value(item, _info):
# Since ast_from_value needs graphql.type, it can only be imported later
from ..utilities import ast_from_value
value_ast = ast_from_value(item[1].default_value, item[1].type)
return print_ast(value_ast) if value_ast else None | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 481 | 486 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,286 | is_deprecated | def is_deprecated(item, _info):
return item[1].deprecation_reason is not None | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 489 | 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,287 | deprecation_reason | def deprecation_reason(item, _info):
return item[1].deprecation_reason | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 493 | 494 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,288 | is_introspection_type | def is_introspection_type(type_: GraphQLNamedType) -> bool:
"""Check whether the given named GraphQL type is an introspection type."""
return type_.name in introspection_types | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/introspection.py | 616 | 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,289 | is_type | def is_type(type_: Any) -> bool:
return isinstance(type_, GraphQLType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 171 | 172 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,290 | assert_type | def assert_type(type_: Any) -> GraphQLType:
if not is_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL type.")
return cast(GraphQLType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 175 | 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,291 | __init__ | def __init__(self, type_: GT) -> None:
if not is_type(type_):
raise TypeError(
f"Can only create a wrapper for a GraphQLType, but got: {type_}."
)
self.of_type = type_ | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 191 | 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,292 | __repr__ | def __repr__(self) -> str:
return f"<{self.__class__.__name__} {self.of_type!r}>" | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 198 | 199 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,293 | is_wrapping_type | def is_wrapping_type(type_: Any) -> bool:
return isinstance(type_, GraphQLWrappingType) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 202 | 203 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,294 | assert_wrapping_type | def assert_wrapping_type(type_: Any) -> GraphQLWrappingType:
if not is_wrapping_type(type_):
raise TypeError(f"Expected {type_} to be a GraphQL wrapping type.")
return cast(GraphQLWrappingType, type_) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 206 | 209 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,295 | __init__ | def __init__(
self,
name: str,
description: Optional[str] = None,
extensions: Optional[Dict[str, Any]] = None,
ast_node: Optional[TypeDefinitionNode] = None,
extension_ast_nodes: Optional[Collection[TypeExtensionNode]] = None,
) -> None:
assert_name(name)
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 231 | 266 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,296 | __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 | 268 | 269 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,297 | __str__ | def __str__(self) -> str:
return self.name | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 271 | 272 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,298 | to_kwargs | def to_kwargs(self) -> GraphQLNamedTypeKwargs:
return GraphQLNamedTypeKwargs(
name=self.name,
description=self.description,
extensions=self.extensions,
ast_node=self.ast_node,
extension_ast_nodes=self.extension_ast_nodes,
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 274 | 281 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,299 | __copy__ | def __copy__(self) -> "GraphQLNamedType": # pragma: no cover
return self.__class__(**self.to_kwargs()) | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 283 | 284 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,300 | resolve_thunk | def resolve_thunk(thunk: Thunk[T]) -> T:
"""Resolve the given thunk.
Used while defining GraphQL types to allow for circular references in otherwise
immutable type definitions.
"""
return thunk() if callable(thunk) else thunk | python | python-3.10.8.amd64/Lib/site-packages/graphql/type/definition.py | 294 | 300 | {
"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.