kinds.js.flow 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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>;