kinds.js.flow 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // @flow strict
  2. /**
  3. * The set of allowed kind values for AST nodes.
  4. */
  5. export const Kind = Object.freeze({
  6. // Name
  7. NAME: 'Name',
  8. // Document
  9. DOCUMENT: 'Document',
  10. OPERATION_DEFINITION: 'OperationDefinition',
  11. VARIABLE_DEFINITION: 'VariableDefinition',
  12. SELECTION_SET: 'SelectionSet',
  13. FIELD: 'Field',
  14. ARGUMENT: 'Argument',
  15. // Fragments
  16. FRAGMENT_SPREAD: 'FragmentSpread',
  17. INLINE_FRAGMENT: 'InlineFragment',
  18. FRAGMENT_DEFINITION: 'FragmentDefinition',
  19. // Values
  20. VARIABLE: 'Variable',
  21. INT: 'IntValue',
  22. FLOAT: 'FloatValue',
  23. STRING: 'StringValue',
  24. BOOLEAN: 'BooleanValue',
  25. NULL: 'NullValue',
  26. ENUM: 'EnumValue',
  27. LIST: 'ListValue',
  28. OBJECT: 'ObjectValue',
  29. OBJECT_FIELD: 'ObjectField',
  30. // Directives
  31. DIRECTIVE: 'Directive',
  32. // Types
  33. NAMED_TYPE: 'NamedType',
  34. LIST_TYPE: 'ListType',
  35. NON_NULL_TYPE: 'NonNullType',
  36. // Type System Definitions
  37. SCHEMA_DEFINITION: 'SchemaDefinition',
  38. OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',
  39. // Type Definitions
  40. SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',
  41. OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',
  42. FIELD_DEFINITION: 'FieldDefinition',
  43. INPUT_VALUE_DEFINITION: 'InputValueDefinition',
  44. INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',
  45. UNION_TYPE_DEFINITION: 'UnionTypeDefinition',
  46. ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',
  47. ENUM_VALUE_DEFINITION: 'EnumValueDefinition',
  48. INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',
  49. // Directive Definitions
  50. DIRECTIVE_DEFINITION: 'DirectiveDefinition',
  51. // Type System Extensions
  52. SCHEMA_EXTENSION: 'SchemaExtension',
  53. // Type Extensions
  54. SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',
  55. OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',
  56. INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',
  57. UNION_TYPE_EXTENSION: 'UnionTypeExtension',
  58. ENUM_TYPE_EXTENSION: 'EnumTypeExtension',
  59. INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension',
  60. });
  61. /**
  62. * The enum type representing the possible kind values of AST nodes.
  63. */
  64. export type KindEnum = $Values<typeof Kind>;