specifiedRules.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.specifiedSDLRules = exports.specifiedRules = void 0;
  6. var _ExecutableDefinitionsRule = require("./rules/ExecutableDefinitionsRule.js");
  7. var _UniqueOperationNamesRule = require("./rules/UniqueOperationNamesRule.js");
  8. var _LoneAnonymousOperationRule = require("./rules/LoneAnonymousOperationRule.js");
  9. var _SingleFieldSubscriptionsRule = require("./rules/SingleFieldSubscriptionsRule.js");
  10. var _KnownTypeNamesRule = require("./rules/KnownTypeNamesRule.js");
  11. var _FragmentsOnCompositeTypesRule = require("./rules/FragmentsOnCompositeTypesRule.js");
  12. var _VariablesAreInputTypesRule = require("./rules/VariablesAreInputTypesRule.js");
  13. var _ScalarLeafsRule = require("./rules/ScalarLeafsRule.js");
  14. var _FieldsOnCorrectTypeRule = require("./rules/FieldsOnCorrectTypeRule.js");
  15. var _UniqueFragmentNamesRule = require("./rules/UniqueFragmentNamesRule.js");
  16. var _KnownFragmentNamesRule = require("./rules/KnownFragmentNamesRule.js");
  17. var _NoUnusedFragmentsRule = require("./rules/NoUnusedFragmentsRule.js");
  18. var _PossibleFragmentSpreadsRule = require("./rules/PossibleFragmentSpreadsRule.js");
  19. var _NoFragmentCyclesRule = require("./rules/NoFragmentCyclesRule.js");
  20. var _UniqueVariableNamesRule = require("./rules/UniqueVariableNamesRule.js");
  21. var _NoUndefinedVariablesRule = require("./rules/NoUndefinedVariablesRule.js");
  22. var _NoUnusedVariablesRule = require("./rules/NoUnusedVariablesRule.js");
  23. var _KnownDirectivesRule = require("./rules/KnownDirectivesRule.js");
  24. var _UniqueDirectivesPerLocationRule = require("./rules/UniqueDirectivesPerLocationRule.js");
  25. var _KnownArgumentNamesRule = require("./rules/KnownArgumentNamesRule.js");
  26. var _UniqueArgumentNamesRule = require("./rules/UniqueArgumentNamesRule.js");
  27. var _ValuesOfCorrectTypeRule = require("./rules/ValuesOfCorrectTypeRule.js");
  28. var _ProvidedRequiredArgumentsRule = require("./rules/ProvidedRequiredArgumentsRule.js");
  29. var _VariablesInAllowedPositionRule = require("./rules/VariablesInAllowedPositionRule.js");
  30. var _OverlappingFieldsCanBeMergedRule = require("./rules/OverlappingFieldsCanBeMergedRule.js");
  31. var _UniqueInputFieldNamesRule = require("./rules/UniqueInputFieldNamesRule.js");
  32. var _LoneSchemaDefinitionRule = require("./rules/LoneSchemaDefinitionRule.js");
  33. var _UniqueOperationTypesRule = require("./rules/UniqueOperationTypesRule.js");
  34. var _UniqueTypeNamesRule = require("./rules/UniqueTypeNamesRule.js");
  35. var _UniqueEnumValueNamesRule = require("./rules/UniqueEnumValueNamesRule.js");
  36. var _UniqueFieldDefinitionNamesRule = require("./rules/UniqueFieldDefinitionNamesRule.js");
  37. var _UniqueDirectiveNamesRule = require("./rules/UniqueDirectiveNamesRule.js");
  38. var _PossibleTypeExtensionsRule = require("./rules/PossibleTypeExtensionsRule.js");
  39. // Spec Section: "Executable Definitions"
  40. // Spec Section: "Operation Name Uniqueness"
  41. // Spec Section: "Lone Anonymous Operation"
  42. // Spec Section: "Subscriptions with Single Root Field"
  43. // Spec Section: "Fragment Spread Type Existence"
  44. // Spec Section: "Fragments on Composite Types"
  45. // Spec Section: "Variables are Input Types"
  46. // Spec Section: "Leaf Field Selections"
  47. // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
  48. // Spec Section: "Fragment Name Uniqueness"
  49. // Spec Section: "Fragment spread target defined"
  50. // Spec Section: "Fragments must be used"
  51. // Spec Section: "Fragment spread is possible"
  52. // Spec Section: "Fragments must not form cycles"
  53. // Spec Section: "Variable Uniqueness"
  54. // Spec Section: "All Variable Used Defined"
  55. // Spec Section: "All Variables Used"
  56. // Spec Section: "Directives Are Defined"
  57. // Spec Section: "Directives Are Unique Per Location"
  58. // Spec Section: "Argument Names"
  59. // Spec Section: "Argument Uniqueness"
  60. // Spec Section: "Value Type Correctness"
  61. // Spec Section: "Argument Optionality"
  62. // Spec Section: "All Variable Usages Are Allowed"
  63. // Spec Section: "Field Selection Merging"
  64. // Spec Section: "Input Object Field Uniqueness"
  65. // SDL-specific validation rules
  66. /**
  67. * This set includes all validation rules defined by the GraphQL spec.
  68. *
  69. * The order of the rules in this list has been adjusted to lead to the
  70. * most clear output when encountering multiple validation errors.
  71. */
  72. var specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule]);
  73. /**
  74. * @internal
  75. */
  76. exports.specifiedRules = specifiedRules;
  77. var specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]);
  78. exports.specifiedSDLRules = specifiedSDLRules;