index.js.flow 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. // @flow strict
  2. export { validate } from './validate';
  3. export { ValidationContext } from './ValidationContext';
  4. export type { ValidationRule } from './ValidationContext';
  5. // All validation rules in the GraphQL Specification.
  6. export { specifiedRules } from './specifiedRules';
  7. // Spec Section: "Executable Definitions"
  8. export {
  9. ExecutableDefinitions as ExecutableDefinitionsRule,
  10. } from './rules/ExecutableDefinitions';
  11. // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
  12. export {
  13. FieldsOnCorrectType as FieldsOnCorrectTypeRule,
  14. } from './rules/FieldsOnCorrectType';
  15. // Spec Section: "Fragments on Composite Types"
  16. export {
  17. FragmentsOnCompositeTypes as FragmentsOnCompositeTypesRule,
  18. } from './rules/FragmentsOnCompositeTypes';
  19. // Spec Section: "Argument Names"
  20. export {
  21. KnownArgumentNames as KnownArgumentNamesRule,
  22. } from './rules/KnownArgumentNames';
  23. // Spec Section: "Directives Are Defined"
  24. export {
  25. KnownDirectives as KnownDirectivesRule,
  26. } from './rules/KnownDirectives';
  27. // Spec Section: "Fragment spread target defined"
  28. export {
  29. KnownFragmentNames as KnownFragmentNamesRule,
  30. } from './rules/KnownFragmentNames';
  31. // Spec Section: "Fragment Spread Type Existence"
  32. export { KnownTypeNames as KnownTypeNamesRule } from './rules/KnownTypeNames';
  33. // Spec Section: "Lone Anonymous Operation"
  34. export {
  35. LoneAnonymousOperation as LoneAnonymousOperationRule,
  36. } from './rules/LoneAnonymousOperation';
  37. // Spec Section: "Fragments must not form cycles"
  38. export {
  39. NoFragmentCycles as NoFragmentCyclesRule,
  40. } from './rules/NoFragmentCycles';
  41. // Spec Section: "All Variable Used Defined"
  42. export {
  43. NoUndefinedVariables as NoUndefinedVariablesRule,
  44. } from './rules/NoUndefinedVariables';
  45. // Spec Section: "Fragments must be used"
  46. export {
  47. NoUnusedFragments as NoUnusedFragmentsRule,
  48. } from './rules/NoUnusedFragments';
  49. // Spec Section: "All Variables Used"
  50. export {
  51. NoUnusedVariables as NoUnusedVariablesRule,
  52. } from './rules/NoUnusedVariables';
  53. // Spec Section: "Field Selection Merging"
  54. export {
  55. OverlappingFieldsCanBeMerged as OverlappingFieldsCanBeMergedRule,
  56. } from './rules/OverlappingFieldsCanBeMerged';
  57. // Spec Section: "Fragment spread is possible"
  58. export {
  59. PossibleFragmentSpreads as PossibleFragmentSpreadsRule,
  60. } from './rules/PossibleFragmentSpreads';
  61. // Spec Section: "Argument Optionality"
  62. export {
  63. ProvidedRequiredArguments as ProvidedRequiredArgumentsRule,
  64. } from './rules/ProvidedRequiredArguments';
  65. // Spec Section: "Leaf Field Selections"
  66. export { ScalarLeafs as ScalarLeafsRule } from './rules/ScalarLeafs';
  67. // Spec Section: "Subscriptions with Single Root Field"
  68. export {
  69. SingleFieldSubscriptions as SingleFieldSubscriptionsRule,
  70. } from './rules/SingleFieldSubscriptions';
  71. // Spec Section: "Argument Uniqueness"
  72. export {
  73. UniqueArgumentNames as UniqueArgumentNamesRule,
  74. } from './rules/UniqueArgumentNames';
  75. // Spec Section: "Directives Are Unique Per Location"
  76. export {
  77. UniqueDirectivesPerLocation as UniqueDirectivesPerLocationRule,
  78. } from './rules/UniqueDirectivesPerLocation';
  79. // Spec Section: "Fragment Name Uniqueness"
  80. export {
  81. UniqueFragmentNames as UniqueFragmentNamesRule,
  82. } from './rules/UniqueFragmentNames';
  83. // Spec Section: "Input Object Field Uniqueness"
  84. export {
  85. UniqueInputFieldNames as UniqueInputFieldNamesRule,
  86. } from './rules/UniqueInputFieldNames';
  87. // Spec Section: "Operation Name Uniqueness"
  88. export {
  89. UniqueOperationNames as UniqueOperationNamesRule,
  90. } from './rules/UniqueOperationNames';
  91. // Spec Section: "Variable Uniqueness"
  92. export {
  93. UniqueVariableNames as UniqueVariableNamesRule,
  94. } from './rules/UniqueVariableNames';
  95. // Spec Section: "Values Type Correctness"
  96. export {
  97. ValuesOfCorrectType as ValuesOfCorrectTypeRule,
  98. } from './rules/ValuesOfCorrectType';
  99. // Spec Section: "Variables are Input Types"
  100. export {
  101. VariablesAreInputTypes as VariablesAreInputTypesRule,
  102. } from './rules/VariablesAreInputTypes';
  103. // Spec Section: "All Variable Usages Are Allowed"
  104. export {
  105. VariablesInAllowedPosition as VariablesInAllowedPositionRule,
  106. } from './rules/VariablesInAllowedPosition';
  107. // SDL-specific validation rules
  108. export {
  109. LoneSchemaDefinition as LoneSchemaDefinitionRule,
  110. } from './rules/LoneSchemaDefinition';
  111. export {
  112. UniqueOperationTypes as UniqueOperationTypesRule,
  113. } from './rules/UniqueOperationTypes';
  114. export {
  115. UniqueTypeNames as UniqueTypeNamesRule,
  116. } from './rules/UniqueTypeNames';
  117. export {
  118. UniqueEnumValueNames as UniqueEnumValueNamesRule,
  119. } from './rules/UniqueEnumValueNames';
  120. export {
  121. UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesRule,
  122. } from './rules/UniqueFieldDefinitionNames';
  123. export {
  124. UniqueDirectiveNames as UniqueDirectiveNamesRule,
  125. } from './rules/UniqueDirectiveNames';
  126. export {
  127. PossibleTypeExtensions as PossibleTypeExtensionsRule,
  128. } from './rules/PossibleTypeExtensions';