ArgumentNode.php
2 months ago
BooleanValueNode.php
2 months ago
DefinitionNode.php
2 months ago
DirectiveDefinitionNode.php
2 months ago
DirectiveNode.php
2 months ago
DocumentNode.php
2 months ago
EnumTypeDefinitionNode.php
2 months ago
EnumTypeExtensionNode.php
2 months ago
EnumValueDefinitionNode.php
2 months ago
EnumValueNode.php
2 months ago
ExecutableDefinitionNode.php
2 months ago
FieldDefinitionNode.php
2 months ago
FieldNode.php
2 months ago
FloatValueNode.php
2 months ago
FragmentDefinitionNode.php
2 months ago
FragmentSpreadNode.php
2 months ago
HasSelectionSet.php
2 months ago
InlineFragmentNode.php
2 months ago
InputObjectTypeDefinitionNode.php
2 months ago
InputObjectTypeExtensionNode.php
2 months ago
InputValueDefinitionNode.php
2 months ago
IntValueNode.php
2 months ago
InterfaceTypeDefinitionNode.php
2 months ago
InterfaceTypeExtensionNode.php
2 months ago
ListTypeNode.php
2 months ago
ListValueNode.php
2 months ago
Location.php
2 months ago
NameNode.php
2 months ago
NamedTypeNode.php
2 months ago
Node.php
2 months ago
NodeKind.php
2 months ago
NodeList.php
2 months ago
NonNullTypeNode.php
2 months ago
NullValueNode.php
2 months ago
ObjectFieldNode.php
2 months ago
ObjectTypeDefinitionNode.php
2 months ago
ObjectTypeExtensionNode.php
2 months ago
ObjectValueNode.php
2 months ago
OperationDefinitionNode.php
2 months ago
OperationTypeDefinitionNode.php
2 months ago
ScalarTypeDefinitionNode.php
2 months ago
ScalarTypeExtensionNode.php
2 months ago
SchemaDefinitionNode.php
2 months ago
SchemaExtensionNode.php
2 months ago
SelectionNode.php
2 months ago
SelectionSetNode.php
2 months ago
StringValueNode.php
2 months ago
TypeDefinitionNode.php
2 months ago
TypeExtensionNode.php
2 months ago
TypeNode.php
2 months ago
TypeSystemDefinitionNode.php
2 months ago
TypeSystemExtensionNode.php
2 months ago
UnionTypeDefinitionNode.php
2 months ago
UnionTypeExtensionNode.php
2 months ago
ValueNode.php
2 months ago
VariableDefinitionNode.php
2 months ago
VariableNode.php
2 months ago
NodeKind.php
139 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Automattic\WooCommerce\Vendor\GraphQL\Language\AST; |
| 4 | |
| 5 | /** |
| 6 | * Holds constants of possible AST nodes. |
| 7 | */ |
| 8 | class NodeKind |
| 9 | { |
| 10 | // constants from language/kinds.js: |
| 11 | |
| 12 | public const NAME = 'Name'; |
| 13 | |
| 14 | // Document |
| 15 | public const DOCUMENT = 'Document'; |
| 16 | public const OPERATION_DEFINITION = 'OperationDefinition'; |
| 17 | public const VARIABLE_DEFINITION = 'VariableDefinition'; |
| 18 | public const VARIABLE = 'Variable'; |
| 19 | public const SELECTION_SET = 'SelectionSet'; |
| 20 | public const FIELD = 'Field'; |
| 21 | public const ARGUMENT = 'Argument'; |
| 22 | |
| 23 | // Fragments |
| 24 | public const FRAGMENT_SPREAD = 'FragmentSpread'; |
| 25 | public const INLINE_FRAGMENT = 'InlineFragment'; |
| 26 | public const FRAGMENT_DEFINITION = 'FragmentDefinition'; |
| 27 | |
| 28 | // Values |
| 29 | public const INT = 'IntValue'; |
| 30 | public const FLOAT = 'FloatValue'; |
| 31 | public const STRING = 'StringValue'; |
| 32 | public const BOOLEAN = 'BooleanValue'; |
| 33 | public const ENUM = 'EnumValue'; |
| 34 | public const NULL = 'NullValue'; |
| 35 | public const LST = 'ListValue'; |
| 36 | public const OBJECT = 'ObjectValue'; |
| 37 | public const OBJECT_FIELD = 'ObjectField'; |
| 38 | |
| 39 | // Directives |
| 40 | public const DIRECTIVE = 'Directive'; |
| 41 | |
| 42 | // Types |
| 43 | public const NAMED_TYPE = 'NamedType'; |
| 44 | public const LIST_TYPE = 'ListType'; |
| 45 | public const NON_NULL_TYPE = 'NonNullType'; |
| 46 | |
| 47 | // Type System Definitions |
| 48 | public const SCHEMA_DEFINITION = 'SchemaDefinition'; |
| 49 | public const OPERATION_TYPE_DEFINITION = 'OperationTypeDefinition'; |
| 50 | |
| 51 | // Type Definitions |
| 52 | public const SCALAR_TYPE_DEFINITION = 'ScalarTypeDefinition'; |
| 53 | public const OBJECT_TYPE_DEFINITION = 'ObjectTypeDefinition'; |
| 54 | public const FIELD_DEFINITION = 'FieldDefinition'; |
| 55 | public const INPUT_VALUE_DEFINITION = 'InputValueDefinition'; |
| 56 | public const INTERFACE_TYPE_DEFINITION = 'InterfaceTypeDefinition'; |
| 57 | public const UNION_TYPE_DEFINITION = 'UnionTypeDefinition'; |
| 58 | public const ENUM_TYPE_DEFINITION = 'EnumTypeDefinition'; |
| 59 | public const ENUM_VALUE_DEFINITION = 'EnumValueDefinition'; |
| 60 | public const INPUT_OBJECT_TYPE_DEFINITION = 'InputObjectTypeDefinition'; |
| 61 | |
| 62 | // Type Extensions |
| 63 | public const SCALAR_TYPE_EXTENSION = 'ScalarTypeExtension'; |
| 64 | public const OBJECT_TYPE_EXTENSION = 'ObjectTypeExtension'; |
| 65 | public const INTERFACE_TYPE_EXTENSION = 'InterfaceTypeExtension'; |
| 66 | public const UNION_TYPE_EXTENSION = 'UnionTypeExtension'; |
| 67 | public const ENUM_TYPE_EXTENSION = 'EnumTypeExtension'; |
| 68 | public const INPUT_OBJECT_TYPE_EXTENSION = 'InputObjectTypeExtension'; |
| 69 | |
| 70 | // Directive Definitions |
| 71 | public const DIRECTIVE_DEFINITION = 'DirectiveDefinition'; |
| 72 | |
| 73 | // Type System Extensions |
| 74 | public const SCHEMA_EXTENSION = 'SchemaExtension'; |
| 75 | |
| 76 | public const CLASS_MAP = [ |
| 77 | self::NAME => NameNode::class, |
| 78 | |
| 79 | // Document |
| 80 | self::DOCUMENT => DocumentNode::class, |
| 81 | self::OPERATION_DEFINITION => OperationDefinitionNode::class, |
| 82 | self::VARIABLE_DEFINITION => VariableDefinitionNode::class, |
| 83 | self::VARIABLE => VariableNode::class, |
| 84 | self::SELECTION_SET => SelectionSetNode::class, |
| 85 | self::FIELD => FieldNode::class, |
| 86 | self::ARGUMENT => ArgumentNode::class, |
| 87 | |
| 88 | // Fragments |
| 89 | self::FRAGMENT_SPREAD => FragmentSpreadNode::class, |
| 90 | self::INLINE_FRAGMENT => InlineFragmentNode::class, |
| 91 | self::FRAGMENT_DEFINITION => FragmentDefinitionNode::class, |
| 92 | |
| 93 | // Values |
| 94 | self::INT => IntValueNode::class, |
| 95 | self::FLOAT => FloatValueNode::class, |
| 96 | self::STRING => StringValueNode::class, |
| 97 | self::BOOLEAN => BooleanValueNode::class, |
| 98 | self::ENUM => EnumValueNode::class, |
| 99 | self::NULL => NullValueNode::class, |
| 100 | self::LST => ListValueNode::class, |
| 101 | self::OBJECT => ObjectValueNode::class, |
| 102 | self::OBJECT_FIELD => ObjectFieldNode::class, |
| 103 | |
| 104 | // Directives |
| 105 | self::DIRECTIVE => DirectiveNode::class, |
| 106 | |
| 107 | // Types |
| 108 | self::NAMED_TYPE => NamedTypeNode::class, |
| 109 | self::LIST_TYPE => ListTypeNode::class, |
| 110 | self::NON_NULL_TYPE => NonNullTypeNode::class, |
| 111 | |
| 112 | // Type System Definitions |
| 113 | self::SCHEMA_DEFINITION => SchemaDefinitionNode::class, |
| 114 | self::OPERATION_TYPE_DEFINITION => OperationTypeDefinitionNode::class, |
| 115 | |
| 116 | // Type Definitions |
| 117 | self::SCALAR_TYPE_DEFINITION => ScalarTypeDefinitionNode::class, |
| 118 | self::OBJECT_TYPE_DEFINITION => ObjectTypeDefinitionNode::class, |
| 119 | self::FIELD_DEFINITION => FieldDefinitionNode::class, |
| 120 | self::INPUT_VALUE_DEFINITION => InputValueDefinitionNode::class, |
| 121 | self::INTERFACE_TYPE_DEFINITION => InterfaceTypeDefinitionNode::class, |
| 122 | self::UNION_TYPE_DEFINITION => UnionTypeDefinitionNode::class, |
| 123 | self::ENUM_TYPE_DEFINITION => EnumTypeDefinitionNode::class, |
| 124 | self::ENUM_VALUE_DEFINITION => EnumValueDefinitionNode::class, |
| 125 | self::INPUT_OBJECT_TYPE_DEFINITION => InputObjectTypeDefinitionNode::class, |
| 126 | |
| 127 | // Type Extensions |
| 128 | self::SCALAR_TYPE_EXTENSION => ScalarTypeExtensionNode::class, |
| 129 | self::OBJECT_TYPE_EXTENSION => ObjectTypeExtensionNode::class, |
| 130 | self::INTERFACE_TYPE_EXTENSION => InterfaceTypeExtensionNode::class, |
| 131 | self::UNION_TYPE_EXTENSION => UnionTypeExtensionNode::class, |
| 132 | self::ENUM_TYPE_EXTENSION => EnumTypeExtensionNode::class, |
| 133 | self::INPUT_OBJECT_TYPE_EXTENSION => InputObjectTypeExtensionNode::class, |
| 134 | |
| 135 | // Directive Definitions |
| 136 | self::DIRECTIVE_DEFINITION => DirectiveDefinitionNode::class, |
| 137 | ]; |
| 138 | } |
| 139 |