index.js.flow 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule';
  9. // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
  10. export { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule';
  11. // Spec Section: "Fragments on Composite Types"
  12. export { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule';
  13. // Spec Section: "Argument Names"
  14. export { KnownArgumentNamesRule } from './rules/KnownArgumentNamesRule';
  15. // Spec Section: "Directives Are Defined"
  16. export { KnownDirectivesRule } from './rules/KnownDirectivesRule';
  17. // Spec Section: "Fragment spread target defined"
  18. export { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule';
  19. // Spec Section: "Fragment Spread Type Existence"
  20. export { KnownTypeNamesRule } from './rules/KnownTypeNamesRule';
  21. // Spec Section: "Lone Anonymous Operation"
  22. export { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule';
  23. // Spec Section: "Fragments must not form cycles"
  24. export { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule';
  25. // Spec Section: "All Variable Used Defined"
  26. export { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule';
  27. // Spec Section: "Fragments must be used"
  28. export { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule';
  29. // Spec Section: "All Variables Used"
  30. export { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule';
  31. // Spec Section: "Field Selection Merging"
  32. export { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule';
  33. // Spec Section: "Fragment spread is possible"
  34. export { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule';
  35. // Spec Section: "Argument Optionality"
  36. export { ProvidedRequiredArgumentsRule } from './rules/ProvidedRequiredArgumentsRule';
  37. // Spec Section: "Leaf Field Selections"
  38. export { ScalarLeafsRule } from './rules/ScalarLeafsRule';
  39. // Spec Section: "Subscriptions with Single Root Field"
  40. export { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule';
  41. // Spec Section: "Argument Uniqueness"
  42. export { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule';
  43. // Spec Section: "Directives Are Unique Per Location"
  44. export { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule';
  45. // Spec Section: "Fragment Name Uniqueness"
  46. export { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule';
  47. // Spec Section: "Input Object Field Uniqueness"
  48. export { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule';
  49. // Spec Section: "Operation Name Uniqueness"
  50. export { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule';
  51. // Spec Section: "Variable Uniqueness"
  52. export { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule';
  53. // Spec Section: "Values Type Correctness"
  54. export { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule';
  55. // Spec Section: "Variables are Input Types"
  56. export { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule';
  57. // Spec Section: "All Variable Usages Are Allowed"
  58. export { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule';
  59. // SDL-specific validation rules
  60. export { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule';
  61. export { UniqueOperationTypesRule } from './rules/UniqueOperationTypesRule';
  62. export { UniqueTypeNamesRule } from './rules/UniqueTypeNamesRule';
  63. export { UniqueEnumValueNamesRule } from './rules/UniqueEnumValueNamesRule';
  64. export { UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNamesRule';
  65. export { UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNamesRule';
  66. export { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule';
  67. // Optional rules not defined by the GraphQL Specification
  68. export { NoDeprecatedCustomRule } from './rules/custom/NoDeprecatedCustomRule';
  69. export { NoSchemaIntrospectionCustomRule } from './rules/custom/NoSchemaIntrospectionCustomRule';