specifiedRules.d.ts 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import { ValidationRule, SDLValidationRule } from './ValidationContext';
  2. // Spec Section: "Executable Definitions"
  3. import { ExecutableDefinitions } from './rules/ExecutableDefinitions';
  4. // Spec Section: "Operation Name Uniqueness"
  5. import { UniqueOperationNames } from './rules/UniqueOperationNames';
  6. // Spec Section: "Lone Anonymous Operation"
  7. import { LoneAnonymousOperation } from './rules/LoneAnonymousOperation';
  8. // Spec Section: "Subscriptions with Single Root Field"
  9. import { SingleFieldSubscriptions } from './rules/SingleFieldSubscriptions';
  10. // Spec Section: "Fragment Spread Type Existence"
  11. import { KnownTypeNames } from './rules/KnownTypeNames';
  12. // Spec Section: "Fragments on Composite Types"
  13. import { FragmentsOnCompositeTypes } from './rules/FragmentsOnCompositeTypes';
  14. // Spec Section: "Variables are Input Types"
  15. import { VariablesAreInputTypes } from './rules/VariablesAreInputTypes';
  16. // Spec Section: "Leaf Field Selections"
  17. import { ScalarLeafs } from './rules/ScalarLeafs';
  18. // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
  19. import { FieldsOnCorrectType } from './rules/FieldsOnCorrectType';
  20. // Spec Section: "Fragment Name Uniqueness"
  21. import { UniqueFragmentNames } from './rules/UniqueFragmentNames';
  22. // Spec Section: "Fragment spread target defined"
  23. import { KnownFragmentNames } from './rules/KnownFragmentNames';
  24. // Spec Section: "Fragments must be used"
  25. import { NoUnusedFragments } from './rules/NoUnusedFragments';
  26. // Spec Section: "Fragment spread is possible"
  27. import { PossibleFragmentSpreads } from './rules/PossibleFragmentSpreads';
  28. // Spec Section: "Fragments must not form cycles"
  29. import { NoFragmentCycles } from './rules/NoFragmentCycles';
  30. // Spec Section: "Variable Uniqueness"
  31. import { UniqueVariableNames } from './rules/UniqueVariableNames';
  32. // Spec Section: "All Variable Used Defined"
  33. import { NoUndefinedVariables } from './rules/NoUndefinedVariables';
  34. // Spec Section: "All Variables Used"
  35. import { NoUnusedVariables } from './rules/NoUnusedVariables';
  36. // Spec Section: "Directives Are Defined"
  37. import { KnownDirectives } from './rules/KnownDirectives';
  38. // Spec Section: "Directives Are Unique Per Location"
  39. import { UniqueDirectivesPerLocation } from './rules/UniqueDirectivesPerLocation';
  40. // Spec Section: "Argument Names"
  41. import {
  42. KnownArgumentNames,
  43. KnownArgumentNamesOnDirectives, // @internal
  44. } from './rules/KnownArgumentNames';
  45. // Spec Section: "Argument Uniqueness"
  46. import { UniqueArgumentNames } from './rules/UniqueArgumentNames';
  47. // Spec Section: "Value Type Correctness"
  48. import { ValuesOfCorrectType } from './rules/ValuesOfCorrectType';
  49. // Spec Section: "Argument Optionality"
  50. import {
  51. ProvidedRequiredArguments,
  52. ProvidedRequiredArgumentsOnDirectives, // @internal
  53. } from './rules/ProvidedRequiredArguments';
  54. // Spec Section: "All Variable Usages Are Allowed"
  55. import { VariablesInAllowedPosition } from './rules/VariablesInAllowedPosition';
  56. // Spec Section: "Field Selection Merging"
  57. import { OverlappingFieldsCanBeMerged } from './rules/OverlappingFieldsCanBeMerged';
  58. // Spec Section: "Input Object Field Uniqueness"
  59. import { UniqueInputFieldNames } from './rules/UniqueInputFieldNames';
  60. /**
  61. * This set includes all validation rules defined by the GraphQL spec.
  62. *
  63. * The order of the rules in this list has been adjusted to lead to the
  64. * most clear output when encountering multiple validation errors.
  65. */
  66. export const specifiedRules: ReadonlyArray<ValidationRule>;
  67. import { LoneSchemaDefinition } from './rules/LoneSchemaDefinition';
  68. // @internal
  69. export const specifiedSDLRules: ReadonlyArray<SDLValidationRule>;