|
25 | 25 |
|
26 | 26 |
|
27 | 27 | def is_definition_node(node: Node) -> bool: |
| 28 | + """Check whether the given node represents a definition.""" |
28 | 29 | return isinstance(node, DefinitionNode) |
29 | 30 |
|
30 | 31 |
|
31 | 32 | def is_executable_definition_node(node: Node) -> bool: |
| 33 | + """Check whether the given node represents an executable definition.""" |
32 | 34 | return isinstance(node, ExecutableDefinitionNode) |
33 | 35 |
|
34 | 36 |
|
35 | 37 | def is_selection_node(node: Node) -> bool: |
| 38 | + """Check whether the given node represents a selection.""" |
36 | 39 | return isinstance(node, SelectionNode) |
37 | 40 |
|
38 | 41 |
|
39 | 42 | def is_value_node(node: Node) -> bool: |
| 43 | + """Check whether the given node represents a value.""" |
40 | 44 | return isinstance(node, ValueNode) |
41 | 45 |
|
42 | 46 |
|
43 | 47 | def is_type_node(node: Node) -> bool: |
| 48 | + """Check whether the given node represents a type.""" |
44 | 49 | return isinstance(node, TypeNode) |
45 | 50 |
|
46 | 51 |
|
47 | 52 | def is_type_system_definition_node(node: Node) -> bool: |
| 53 | + """Check whether the given node represents a type system definition.""" |
48 | 54 | return isinstance(node, TypeSystemDefinitionNode) |
49 | 55 |
|
50 | 56 |
|
51 | 57 | def is_type_definition_node(node: Node) -> bool: |
| 58 | + """Check whether the given node represents a type definition.""" |
52 | 59 | return isinstance(node, TypeDefinitionNode) |
53 | 60 |
|
54 | 61 |
|
55 | 62 | def is_type_system_extension_node(node: Node) -> bool: |
| 63 | + """Check whether the given node represents a type system extension.""" |
56 | 64 | return isinstance(node, (SchemaExtensionNode, TypeExtensionNode)) |
57 | 65 |
|
58 | 66 |
|
59 | 67 | def is_type_extension_node(node: Node) -> bool: |
| 68 | + """Check whether the given node represents a type extension.""" |
60 | 69 | return isinstance(node, TypeExtensionNode) |
0 commit comments