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,001 | leave_argument | def leave_argument(node: PrintedNode, *_args: Any) -> str:
return f"{node.name}: {node.value}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 105 | 106 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,002 | leave_fragment_spread | def leave_fragment_spread(node: PrintedNode, *_args: Any) -> str:
return f"...{node.name}{wrap(' ', join(node.directives, ' '))}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 111 | 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,003 | leave_inline_fragment | def leave_inline_fragment(node: PrintedNode, *_args: Any) -> str:
return join(
(
"...",
wrap("on ", node.type_condition),
join(node.directives, " "),
node.selection_set,
),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 115 | 124 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,004 | leave_fragment_definition | def leave_fragment_definition(node: PrintedNode, *_args: Any) -> str:
# Note: fragment variable definitions are deprecated and will be removed in v3.3
return (
f"fragment {node.name}"
f"{wrap('(', join(node.variable_definitions, ', '), ')')}"
f" on {node.type_conditio... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 127 | 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,005 | leave_int_value | def leave_int_value(node: PrintedNode, *_args: Any) -> str:
return node.value | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 140 | 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,006 | leave_float_value | def leave_float_value(node: PrintedNode, *_args: Any) -> str:
return node.value | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 144 | 145 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,007 | leave_string_value | def leave_string_value(node: PrintedNode, *_args: Any) -> str:
if node.block:
return print_block_string(node.value)
return print_string(node.value) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 148 | 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,008 | leave_boolean_value | def leave_boolean_value(node: PrintedNode, *_args: Any) -> str:
return "true" if node.value else "false" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 154 | 155 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,009 | leave_null_value | def leave_null_value(_node: PrintedNode, *_args: Any) -> str:
return "null" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 158 | 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,010 | leave_enum_value | def leave_enum_value(node: PrintedNode, *_args: Any) -> str:
return node.value | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 162 | 163 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,011 | leave_list_value | def leave_list_value(node: PrintedNode, *_args: Any) -> str:
return f"[{join(node.values, ', ')}]" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 166 | 167 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,012 | leave_object_value | def leave_object_value(node: PrintedNode, *_args: Any) -> str:
return f"{{{join(node.fields, ', ')}}}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 170 | 171 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,013 | leave_object_field | def leave_object_field(node: PrintedNode, *_args: Any) -> str:
return f"{node.name}: {node.value}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 174 | 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,014 | leave_directive | def leave_directive(node: PrintedNode, *_args: Any) -> str:
return f"@{node.name}{wrap('(', join(node.arguments, ', '), ')')}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 180 | 181 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,015 | leave_named_type | def leave_named_type(node: PrintedNode, *_args: Any) -> str:
return node.name | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 186 | 187 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,016 | leave_list_type | def leave_list_type(node: PrintedNode, *_args: Any) -> str:
return f"[{node.type}]" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 190 | 191 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,017 | leave_non_null_type | def leave_non_null_type(node: PrintedNode, *_args: Any) -> str:
return f"{node.type}!" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 194 | 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,018 | leave_schema_definition | def leave_schema_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
"schema",
join(node.directives, " "),
block(node.operation_types),
),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 200 | 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,019 | leave_operation_type_definition | def leave_operation_type_definition(node: PrintedNode, *_args: Any) -> str:
return f"{node.operation.value}: {node.type}" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 211 | 212 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,020 | leave_scalar_type_definition | def leave_scalar_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
"scalar",
node.name,
join(node.directives, " "),
),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 215 | 223 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,021 | leave_object_type_definition | def leave_object_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
"type",
node.name,
wrap("implements ", join(node.interfaces, " & ")),
join(node.directives, " "),
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 226 | 236 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,022 | leave_field_definition | def leave_field_definition(node: PrintedNode, *_args: Any) -> str:
args = node.arguments
args = (
wrap("(\n", indent(join(args, "\n")), "\n)")
if has_multiline_items(args)
else wrap("(", join(args, ", "), ")")
)
directives = wrap(" ", join(node.directi... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 239 | 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,023 | leave_input_value_definition | def leave_input_value_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
f"{node.name}: {node.type}",
wrap("= ", node.default_value),
join(node.directives, " "),
),
" ",
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 253 | 261 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,024 | leave_interface_type_definition | def leave_interface_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
"interface",
node.name,
wrap("implements ", join(node.interfaces, " & ")),
join(node.directives, " "),
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 264 | 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,025 | leave_union_type_definition | def leave_union_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(
"union",
node.name,
join(node.directives, " "),
wrap("= ", join(node.types, " | ")),
),
" ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 277 | 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,026 | leave_enum_type_definition | def leave_enum_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
("enum", node.name, join(node.directives, " "), block(node.values)), " "
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 289 | 292 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,027 | leave_enum_value_definition | def leave_enum_value_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
(node.name, join(node.directives, " ")), " "
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 295 | 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,028 | leave_input_object_type_definition | def leave_input_object_type_definition(node: PrintedNode, *_args: Any) -> str:
return wrap("", node.description, "\n") + join(
("input", node.name, join(node.directives, " "), block(node.fields)), " "
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 301 | 304 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,029 | leave_directive_definition | def leave_directive_definition(node: PrintedNode, *_args: Any) -> str:
args = node.arguments
args = (
wrap("(\n", indent(join(args, "\n")), "\n)")
if has_multiline_items(args)
else wrap("(", join(args, ", "), ")")
)
repeatable = " repeatable" if node.r... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 307 | 319 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,030 | leave_schema_extension | def leave_schema_extension(node: PrintedNode, *_args: Any) -> str:
return join(
("extend schema", join(node.directives, " "), block(node.operation_types)),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 322 | 326 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,031 | leave_scalar_type_extension | def leave_scalar_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(("extend scalar", node.name, join(node.directives, " ")), " ") | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 329 | 330 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,032 | leave_object_type_extension | def leave_object_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(
(
"extend type",
node.name,
wrap("implements ", join(node.interfaces, " & ")),
join(node.directives, " "),
block(node.fields),
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 333 | 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,033 | leave_interface_type_extension | def leave_interface_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(
(
"extend interface",
node.name,
wrap("implements ", join(node.interfaces, " & ")),
join(node.directives, " "),
block(node.fields),
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 346 | 356 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,034 | leave_union_type_extension | def leave_union_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(
(
"extend union",
node.name,
join(node.directives, " "),
wrap("= ", join(node.types, " | ")),
),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 359 | 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,035 | leave_enum_type_extension | def leave_enum_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(
("extend enum", node.name, join(node.directives, " "), block(node.values)),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 371 | 375 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,036 | leave_input_object_type_extension | def leave_input_object_type_extension(node: PrintedNode, *_args: Any) -> str:
return join(
("extend input", node.name, join(node.directives, " "), block(node.fields)),
" ",
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 378 | 382 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,037 | join | def join(strings: Optional[Strings], separator: str = "") -> str:
"""Join strings in a given collection.
Return an empty string if it is None or empty, otherwise join all items together
separated by separator if provided.
"""
return separator.join(s for s in strings if s) if strings else "" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 385 | 391 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,038 | block | def block(strings: Optional[Strings]) -> str:
"""Return strings inside a block.
Given a collection of strings, return a string with each item on its own line,
wrapped in an indented "{ }" block.
"""
return wrap("{\n", indent(join(strings, "\n")), "\n}") | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 394 | 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,039 | wrap | def wrap(start: str, string: Optional[str], end: str = "") -> str:
"""Wrap string inside other strings at start and end.
If the string is not None or empty, then wrap with start and end, otherwise return
an empty string.
"""
return f"{start}{string}{end}" if string else "" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 403 | 409 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,040 | indent | def indent(string: str) -> str:
"""Indent string with two spaces.
If the string is not None or empty, add two spaces at the beginning of every line
inside the string.
"""
return wrap(" ", string.replace("\n", "\n ")) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 412 | 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,041 | is_multiline | def is_multiline(string: str) -> bool:
"""Check whether a string consists of multiple lines."""
return "\n" in string | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 421 | 423 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,042 | has_multiline_items | def has_multiline_items(strings: Optional[Strings]) -> bool:
"""Check whether one of the items in the list has multiple lines."""
return any(is_multiline(item) for item in strings) if strings else False | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py | 426 | 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,043 | __init__ | def __init__(
self,
body: str,
name: str = "GraphQL request",
location_offset: SourceLocation = SourceLocation(1, 1),
) -> None:
"""Initialize source input.
The ``name`` and ``location_offset`` parameters are optional, but they are
useful for clients who stor... | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 14 | 41 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,044 | get_location | def get_location(self, position: int) -> SourceLocation:
lines = self.body[:position].splitlines()
if lines:
line = len(lines)
column = len(lines[-1]) + 1
else:
line = 1
column = 1
return SourceLocation(line, column) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 43 | 51 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,045 | __repr__ | def __repr__(self) -> str:
return f"<{self.__class__.__name__} name={self.name!r}>" | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 53 | 54 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,046 | __eq__ | def __eq__(self, other: Any) -> bool:
return (isinstance(other, Source) and other.body == self.body) or (
isinstance(other, str) and other == self.body
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 56 | 59 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,047 | __ne__ | def __ne__(self, other: Any) -> bool:
return not self == other | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 61 | 62 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,048 | is_source | def is_source(source: Any) -> bool:
"""Test if the given value is a Source object.
For internal use only.
"""
return isinstance(source, Source) | python | python-3.10.8.amd64/Lib/site-packages/graphql/language/source.py | 65 | 70 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,049 | assert_valid_name | def assert_valid_name(name: str) -> str:
"""Uphold the spec rules about naming.
.. deprecated:: 3.2
Please use ``assert_name`` instead. Will be removed in v3.3.
"""
error = is_valid_name_error(name)
if error:
raise error
return name | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/assert_valid_name.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,050 | is_valid_name_error | def is_valid_name_error(name: str) -> Optional[GraphQLError]:
"""Return an Error if a name is invalid.
.. deprecated:: 3.2
Please use ``assert_name`` instead. Will be removed in v3.3.
"""
if not isinstance(name, str):
raise TypeError("Expected name to be a string.")
if name.startswit... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/assert_valid_name.py | 21 | 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,051 | ast_from_value | def ast_from_value(value: Any, type_: GraphQLInputType) -> Optional[ValueNode]:
"""Produce a GraphQL Value AST given a Python object.
This function will match Python/JSON values to GraphQL AST schema format by using
the suggested GraphQLInputType. For example::
ast_from_value('value', GraphQLStrin... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/ast_from_value.py | 37 | 139 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,052 | lexicographic_sort_schema | def lexicographic_sort_schema(schema: GraphQLSchema) -> GraphQLSchema:
"""Sort GraphQLSchema.
This function returns a sorted copy of the given GraphQLSchema.
"""
def replace_type(
type_: Union[GraphQLList, GraphQLNonNull, GraphQLNamedType]
) -> Union[GraphQLList, GraphQLNonNull, GraphQLNam... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 35 | 183 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,053 | replace_type | def replace_type(
type_: Union[GraphQLList, GraphQLNonNull, GraphQLNamedType]
) -> Union[GraphQLList, GraphQLNonNull, GraphQLNamedType]:
if is_list_type(type_):
return GraphQLList(replace_type(cast(GraphQLList, type_).of_type))
if is_non_null_type(type_):
return Graph... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 41 | 48 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,054 | replace_named_type | def replace_named_type(type_: GraphQLNamedType) -> GraphQLNamedType:
return type_map[type_.name] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 50 | 51 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,055 | replace_maybe_type | def replace_maybe_type(
maybe_type: Optional[GraphQLNamedType],
) -> Optional[GraphQLNamedType]:
return maybe_type and replace_named_type(maybe_type) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 53 | 56 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,056 | sort_directive | def sort_directive(directive: GraphQLDirective) -> GraphQLDirective:
return GraphQLDirective(
**merge_kwargs(
directive.to_kwargs(),
locations=sorted(directive.locations, key=sort_by_name_key),
args=sort_args(directive.args),
)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 58 | 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,057 | sort_args | def sort_args(args_map: Dict[str, GraphQLArgument]) -> Dict[str, GraphQLArgument]:
args = {}
for name, arg in sorted(args_map.items()):
args[name] = GraphQLArgument(
**merge_kwargs(
arg.to_kwargs(),
type_=replace_type(cast(GraphQLNamedT... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 67 | 76 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,058 | sort_fields | def sort_fields(fields_map: Dict[str, GraphQLField]) -> Dict[str, GraphQLField]:
fields = {}
for name, field in sorted(fields_map.items()):
fields[name] = GraphQLField(
**merge_kwargs(
field.to_kwargs(),
type_=replace_type(cast(GraphQLN... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 78 | 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,059 | sort_input_fields | def sort_input_fields(
fields_map: Dict[str, GraphQLInputField]
) -> Dict[str, GraphQLInputField]:
return {
name: GraphQLInputField(
cast(
GraphQLInputType, replace_type(cast(GraphQLNamedType, field.type))
),
description... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 90 | 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,060 | sort_types | def sort_types(array: Collection[GraphQLNamedType]) -> Tuple[GraphQLNamedType, ...]:
return tuple(
replace_named_type(type_) for type_ in sorted(array, key=sort_by_name_key)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 105 | 108 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,061 | sort_named_type | def sort_named_type(type_: GraphQLNamedType) -> GraphQLNamedType:
if is_scalar_type(type_) or is_introspection_type(type_):
return type_
if is_object_type(type_):
type_ = cast(GraphQLObjectType, type_)
return GraphQLObjectType(
**merge_kwargs(
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 110 | 162 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,062 | sort_by_name_key | def sort_by_name_key(
type_: Union[GraphQLNamedType, GraphQLDirective, DirectiveLocation]
) -> Tuple:
return natural_comparison_key(type_.name) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/lexicographic_sort_schema.py | 186 | 189 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,063 | sort_value_node | def sort_value_node(value_node: ValueNode) -> ValueNode:
"""Sort ValueNode.
This function returns a sorted copy of the given ValueNode
For internal use only.
"""
if isinstance(value_node, ObjectValueNode):
value_node = copy(value_node)
value_node.fields = sort_fields(value_node.fie... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/sort_value_node.py | 10 | 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,064 | sort_field | def sort_field(field: ObjectFieldNode) -> ObjectFieldNode:
field = copy(field)
field.value = sort_value_node(field.value)
return field | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/sort_value_node.py | 26 | 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,065 | sort_fields | def sort_fields(fields: Tuple[ObjectFieldNode, ...]) -> Tuple[ObjectFieldNode, ...]:
return tuple(
sorted(
(sort_field(field) for field in fields),
key=lambda field: natural_comparison_key(field.name.value),
)
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/sort_value_node.py | 32 | 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,066 | introspection_from_schema | def introspection_from_schema(
schema: GraphQLSchema,
descriptions: bool = True,
specified_by_url: bool = True,
directive_is_repeatable: bool = True,
schema_description: bool = True,
input_value_deprecation: bool = True,
) -> IntrospectionQuery:
"""Build an IntrospectionQuery from a GraphQLS... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/introspection_from_schema.py | 11 | 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,067 | __init__ | def __init__(
self,
schema: GraphQLSchema,
initial_type: Optional[GraphQLType] = None,
get_field_def_fn: Optional[GetFieldDefFn] = None,
) -> None:
"""Initialize the TypeInfo for the given GraphQL schema.
Initial type may be provided in rare cases to facilitate trave... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 66 | 95 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,068 | get_type | def get_type(self) -> Optional[GraphQLOutputType]:
if self._type_stack:
return self._type_stack[-1]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 97 | 100 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,069 | get_parent_type | def get_parent_type(self) -> Optional[GraphQLCompositeType]:
if self._parent_type_stack:
return self._parent_type_stack[-1]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 102 | 105 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,070 | get_input_type | def get_input_type(self) -> Optional[GraphQLInputType]:
if self._input_type_stack:
return self._input_type_stack[-1]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 107 | 110 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,071 | get_parent_input_type | def get_parent_input_type(self) -> Optional[GraphQLInputType]:
if len(self._input_type_stack) > 1:
return self._input_type_stack[-2]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 112 | 115 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,072 | get_field_def | def get_field_def(self) -> Optional[GraphQLField]:
if self._field_def_stack:
return self._field_def_stack[-1]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 117 | 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,073 | get_default_value | def get_default_value(self) -> Any:
if self._default_value_stack:
return self._default_value_stack[-1]
return None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 122 | 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,074 | get_directive | def get_directive(self) -> Optional[GraphQLDirective]:
return self._directive | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 127 | 128 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,075 | get_argument | def get_argument(self) -> Optional[GraphQLArgument]:
return self._argument | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 130 | 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,076 | get_enum_value | def get_enum_value(self) -> Optional[GraphQLEnumValue]:
return self._enum_value | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 133 | 134 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,077 | enter | def enter(self, node: Node) -> None:
method = getattr(self, "enter_" + node.kind, None)
if method:
method(node) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 136 | 139 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,078 | leave | def leave(self, node: Node) -> None:
method = getattr(self, "leave_" + node.kind, None)
if method:
method() | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 141 | 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,079 | enter_selection_set | def enter_selection_set(self, node: SelectionSetNode) -> None:
named_type = get_named_type(self.get_type())
self._parent_type_stack.append(
cast(GraphQLCompositeType, named_type)
if is_composite_type(named_type)
else None
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 147 | 153 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,080 | enter_field | def enter_field(self, node: FieldNode) -> None:
parent_type = self.get_parent_type()
if parent_type:
field_def = self._get_field_def(self._schema, parent_type, node)
field_type = field_def.type if field_def else None
else:
field_def = field_type = None
... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 155 | 163 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,081 | enter_directive | def enter_directive(self, node: DirectiveNode) -> None:
self._directive = self._schema.get_directive(node.name.value) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 165 | 166 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,082 | enter_operation_definition | def enter_operation_definition(self, node: OperationDefinitionNode) -> None:
root_type = self._schema.get_root_type(node.operation)
self._type_stack.append(root_type if is_object_type(root_type) else None) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 168 | 170 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,083 | enter_inline_fragment | def enter_inline_fragment(self, node: InlineFragmentNode) -> None:
type_condition_ast = node.type_condition
output_type = (
type_from_ast(self._schema, type_condition_ast)
if type_condition_ast
else get_named_type(self.get_type())
)
self._type_stack.ap... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 172 | 183 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,084 | enter_variable_definition | def enter_variable_definition(self, node: VariableDefinitionNode) -> None:
input_type = type_from_ast(self._schema, node.type)
self._input_type_stack.append(
cast(GraphQLInputType, input_type) if is_input_type(input_type) else None
) | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 187 | 191 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,085 | enter_argument | def enter_argument(self, node: ArgumentNode) -> None:
field_or_directive = self.get_directive() or self.get_field_def()
if field_or_directive:
arg_def = field_or_directive.args.get(node.name.value)
arg_type = arg_def.type if arg_def else None
else:
arg_def = a... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 193 | 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,086 | enter_list_value | def enter_list_value(self, node: ListValueNode) -> None:
list_type = get_nullable_type(self.get_input_type()) # type: ignore
item_type = (
cast(GraphQLList, list_type).of_type
if is_list_type(list_type)
else list_type
)
# List positions never have a d... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 207 | 216 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,087 | enter_object_field | def enter_object_field(self, node: ObjectFieldNode) -> None:
object_type = get_named_type(self.get_input_type())
if is_input_object_type(object_type):
input_field = cast(GraphQLInputObjectType, object_type).fields.get(
node.name.value
)
input_field_typ... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 218 | 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,088 | enter_enum_value | def enter_enum_value(self, node: EnumValueNode) -> None:
enum_type = get_named_type(self.get_input_type())
if is_enum_type(enum_type):
enum_value = cast(GraphQLEnumType, enum_type).values.get(node.value)
else:
enum_value = None
self._enum_value = enum_value | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 234 | 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,089 | leave_selection_set | def leave_selection_set(self) -> None:
del self._parent_type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 242 | 243 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,090 | leave_field | def leave_field(self) -> None:
del self._field_def_stack[-1:]
del self._type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 245 | 247 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,091 | leave_directive | def leave_directive(self) -> None:
self._directive = None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 249 | 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,092 | leave_operation_definition | def leave_operation_definition(self) -> None:
del self._type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 252 | 253 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,093 | leave_variable_definition | def leave_variable_definition(self) -> None:
del self._input_type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 258 | 259 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,094 | leave_argument | def leave_argument(self) -> None:
self._argument = None
del self._default_value_stack[-1:]
del self._input_type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 261 | 264 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,095 | leave_list_value | def leave_list_value(self) -> None:
del self._default_value_stack[-1:]
del self._input_type_stack[-1:] | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 266 | 268 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,096 | leave_enum_value | def leave_enum_value(self) -> None:
self._enum_value = None | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 272 | 273 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,097 | get_field_def | def get_field_def(
schema: GraphQLSchema, parent_type: GraphQLType, field_node: FieldNode
) -> Optional[GraphQLField]:
"""Get field definition.
Not exactly the same as the executor's definition of
:func:`graphql.execution.get_field_def`, in this statically evaluated environment
we do not always hav... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 276 | 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,098 | __init__ | def __init__(self, type_info: "TypeInfo", visitor: Visitor):
super().__init__()
self.type_info = type_info
self.visitor = visitor | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 301 | 304 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,099 | enter | def enter(self, node: Node, *args: Any) -> Any:
self.type_info.enter(node)
fn = self.visitor.get_enter_leave_for_kind(node.kind).enter
if fn:
result = fn(node, *args)
if result is not None:
self.type_info.leave(node)
if isinstance(result, N... | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 306 | 315 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,070,100 | leave | def leave(self, node: Node, *args: Any) -> Any:
fn = self.visitor.get_enter_leave_for_kind(node.kind).leave
result = fn(node, *args) if fn else None
self.type_info.leave(node)
return result | python | python-3.10.8.amd64/Lib/site-packages/graphql/utilities/type_info.py | 317 | 321 | {
"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.