specifiedRules.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.specifiedSDLRules = exports.specifiedRules = void 0;
  6. var _ExecutableDefinitions = require("./rules/ExecutableDefinitions");
  7. var _UniqueOperationNames = require("./rules/UniqueOperationNames");
  8. var _LoneAnonymousOperation = require("./rules/LoneAnonymousOperation");
  9. var _SingleFieldSubscriptions = require("./rules/SingleFieldSubscriptions");
  10. var _KnownTypeNames = require("./rules/KnownTypeNames");
  11. var _FragmentsOnCompositeTypes = require("./rules/FragmentsOnCompositeTypes");
  12. var _VariablesAreInputTypes = require("./rules/VariablesAreInputTypes");
  13. var _ScalarLeafs = require("./rules/ScalarLeafs");
  14. var _FieldsOnCorrectType = require("./rules/FieldsOnCorrectType");
  15. var _UniqueFragmentNames = require("./rules/UniqueFragmentNames");
  16. var _KnownFragmentNames = require("./rules/KnownFragmentNames");
  17. var _NoUnusedFragments = require("./rules/NoUnusedFragments");
  18. var _PossibleFragmentSpreads = require("./rules/PossibleFragmentSpreads");
  19. var _NoFragmentCycles = require("./rules/NoFragmentCycles");
  20. var _UniqueVariableNames = require("./rules/UniqueVariableNames");
  21. var _NoUndefinedVariables = require("./rules/NoUndefinedVariables");
  22. var _NoUnusedVariables = require("./rules/NoUnusedVariables");
  23. var _KnownDirectives = require("./rules/KnownDirectives");
  24. var _UniqueDirectivesPerLocation = require("./rules/UniqueDirectivesPerLocation");
  25. var _KnownArgumentNames = require("./rules/KnownArgumentNames");
  26. var _UniqueArgumentNames = require("./rules/UniqueArgumentNames");
  27. var _ValuesOfCorrectType = require("./rules/ValuesOfCorrectType");
  28. var _ProvidedRequiredArguments = require("./rules/ProvidedRequiredArguments");
  29. var _VariablesInAllowedPosition = require("./rules/VariablesInAllowedPosition");
  30. var _OverlappingFieldsCanBeMerged = require("./rules/OverlappingFieldsCanBeMerged");
  31. var _UniqueInputFieldNames = require("./rules/UniqueInputFieldNames");
  32. var _LoneSchemaDefinition = require("./rules/LoneSchemaDefinition");
  33. var _UniqueOperationTypes = require("./rules/UniqueOperationTypes");
  34. var _UniqueTypeNames = require("./rules/UniqueTypeNames");
  35. var _UniqueEnumValueNames = require("./rules/UniqueEnumValueNames");
  36. var _UniqueFieldDefinitionNames = require("./rules/UniqueFieldDefinitionNames");
  37. var _UniqueDirectiveNames = require("./rules/UniqueDirectiveNames");
  38. var _PossibleTypeExtensions = require("./rules/PossibleTypeExtensions");
  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. /**
  66. * This set includes all validation rules defined by the GraphQL spec.
  67. *
  68. * The order of the rules in this list has been adjusted to lead to the
  69. * most clear output when encountering multiple validation errors.
  70. */
  71. var specifiedRules = Object.freeze([_ExecutableDefinitions.ExecutableDefinitions, _UniqueOperationNames.UniqueOperationNames, _LoneAnonymousOperation.LoneAnonymousOperation, _SingleFieldSubscriptions.SingleFieldSubscriptions, _KnownTypeNames.KnownTypeNames, _FragmentsOnCompositeTypes.FragmentsOnCompositeTypes, _VariablesAreInputTypes.VariablesAreInputTypes, _ScalarLeafs.ScalarLeafs, _FieldsOnCorrectType.FieldsOnCorrectType, _UniqueFragmentNames.UniqueFragmentNames, _KnownFragmentNames.KnownFragmentNames, _NoUnusedFragments.NoUnusedFragments, _PossibleFragmentSpreads.PossibleFragmentSpreads, _NoFragmentCycles.NoFragmentCycles, _UniqueVariableNames.UniqueVariableNames, _NoUndefinedVariables.NoUndefinedVariables, _NoUnusedVariables.NoUnusedVariables, _KnownDirectives.KnownDirectives, _UniqueDirectivesPerLocation.UniqueDirectivesPerLocation, _KnownArgumentNames.KnownArgumentNames, _UniqueArgumentNames.UniqueArgumentNames, _ValuesOfCorrectType.ValuesOfCorrectType, _ProvidedRequiredArguments.ProvidedRequiredArguments, _VariablesInAllowedPosition.VariablesInAllowedPosition, _OverlappingFieldsCanBeMerged.OverlappingFieldsCanBeMerged, _UniqueInputFieldNames.UniqueInputFieldNames]);
  72. exports.specifiedRules = specifiedRules;
  73. // @internal
  74. var specifiedSDLRules = Object.freeze([_LoneSchemaDefinition.LoneSchemaDefinition, _UniqueOperationTypes.UniqueOperationTypes, _UniqueTypeNames.UniqueTypeNames, _UniqueEnumValueNames.UniqueEnumValueNames, _UniqueFieldDefinitionNames.UniqueFieldDefinitionNames, _UniqueDirectiveNames.UniqueDirectiveNames, _KnownTypeNames.KnownTypeNames, _KnownDirectives.KnownDirectives, _UniqueDirectivesPerLocation.UniqueDirectivesPerLocation, _PossibleTypeExtensions.PossibleTypeExtensions, _KnownArgumentNames.KnownArgumentNamesOnDirectives, _UniqueArgumentNames.UniqueArgumentNames, _UniqueInputFieldNames.UniqueInputFieldNames, _ProvidedRequiredArguments.ProvidedRequiredArgumentsOnDirectives]);
  75. exports.specifiedSDLRules = specifiedSDLRules;