index.js.flow 4.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
// @flow strict

export { validate } from './validate';

export { ValidationContext } from './ValidationContext';
export type { ValidationRule } from './ValidationContext';

// All validation rules in the GraphQL Specification.
export { specifiedRules } from './specifiedRules';

// Spec Section: "Executable Definitions"
export {
  ExecutableDefinitions as ExecutableDefinitionsRule,
} from './rules/ExecutableDefinitions';

// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
export {
  FieldsOnCorrectType as FieldsOnCorrectTypeRule,
} from './rules/FieldsOnCorrectType';

// Spec Section: "Fragments on Composite Types"
export {
  FragmentsOnCompositeTypes as FragmentsOnCompositeTypesRule,
} from './rules/FragmentsOnCompositeTypes';

// Spec Section: "Argument Names"
export {
  KnownArgumentNames as KnownArgumentNamesRule,
} from './rules/KnownArgumentNames';

// Spec Section: "Directives Are Defined"
export {
  KnownDirectives as KnownDirectivesRule,
} from './rules/KnownDirectives';

// Spec Section: "Fragment spread target defined"
export {
  KnownFragmentNames as KnownFragmentNamesRule,
} from './rules/KnownFragmentNames';

// Spec Section: "Fragment Spread Type Existence"
export { KnownTypeNames as KnownTypeNamesRule } from './rules/KnownTypeNames';

// Spec Section: "Lone Anonymous Operation"
export {
  LoneAnonymousOperation as LoneAnonymousOperationRule,
} from './rules/LoneAnonymousOperation';

// Spec Section: "Fragments must not form cycles"
export {
  NoFragmentCycles as NoFragmentCyclesRule,
} from './rules/NoFragmentCycles';

// Spec Section: "All Variable Used Defined"
export {
  NoUndefinedVariables as NoUndefinedVariablesRule,
} from './rules/NoUndefinedVariables';

// Spec Section: "Fragments must be used"
export {
  NoUnusedFragments as NoUnusedFragmentsRule,
} from './rules/NoUnusedFragments';

// Spec Section: "All Variables Used"
export {
  NoUnusedVariables as NoUnusedVariablesRule,
} from './rules/NoUnusedVariables';

// Spec Section: "Field Selection Merging"
export {
  OverlappingFieldsCanBeMerged as OverlappingFieldsCanBeMergedRule,
} from './rules/OverlappingFieldsCanBeMerged';

// Spec Section: "Fragment spread is possible"
export {
  PossibleFragmentSpreads as PossibleFragmentSpreadsRule,
} from './rules/PossibleFragmentSpreads';

// Spec Section: "Argument Optionality"
export {
  ProvidedRequiredArguments as ProvidedRequiredArgumentsRule,
} from './rules/ProvidedRequiredArguments';

// Spec Section: "Leaf Field Selections"
export { ScalarLeafs as ScalarLeafsRule } from './rules/ScalarLeafs';

// Spec Section: "Subscriptions with Single Root Field"
export {
  SingleFieldSubscriptions as SingleFieldSubscriptionsRule,
} from './rules/SingleFieldSubscriptions';

// Spec Section: "Argument Uniqueness"
export {
  UniqueArgumentNames as UniqueArgumentNamesRule,
} from './rules/UniqueArgumentNames';

// Spec Section: "Directives Are Unique Per Location"
export {
  UniqueDirectivesPerLocation as UniqueDirectivesPerLocationRule,
} from './rules/UniqueDirectivesPerLocation';

// Spec Section: "Fragment Name Uniqueness"
export {
  UniqueFragmentNames as UniqueFragmentNamesRule,
} from './rules/UniqueFragmentNames';

// Spec Section: "Input Object Field Uniqueness"
export {
  UniqueInputFieldNames as UniqueInputFieldNamesRule,
} from './rules/UniqueInputFieldNames';

// Spec Section: "Operation Name Uniqueness"
export {
  UniqueOperationNames as UniqueOperationNamesRule,
} from './rules/UniqueOperationNames';

// Spec Section: "Variable Uniqueness"
export {
  UniqueVariableNames as UniqueVariableNamesRule,
} from './rules/UniqueVariableNames';

// Spec Section: "Values Type Correctness"
export {
  ValuesOfCorrectType as ValuesOfCorrectTypeRule,
} from './rules/ValuesOfCorrectType';

// Spec Section: "Variables are Input Types"
export {
  VariablesAreInputTypes as VariablesAreInputTypesRule,
} from './rules/VariablesAreInputTypes';

// Spec Section: "All Variable Usages Are Allowed"
export {
  VariablesInAllowedPosition as VariablesInAllowedPositionRule,
} from './rules/VariablesInAllowedPosition';

// SDL-specific validation rules
export {
  LoneSchemaDefinition as LoneSchemaDefinitionRule,
} from './rules/LoneSchemaDefinition';
export {
  UniqueOperationTypes as UniqueOperationTypesRule,
} from './rules/UniqueOperationTypes';
export {
  UniqueTypeNames as UniqueTypeNamesRule,
} from './rules/UniqueTypeNames';
export {
  UniqueEnumValueNames as UniqueEnumValueNamesRule,
} from './rules/UniqueEnumValueNames';
export {
  UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesRule,
} from './rules/UniqueFieldDefinitionNames';
export {
  UniqueDirectiveNames as UniqueDirectiveNamesRule,
} from './rules/UniqueDirectiveNames';
export {
  PossibleTypeExtensions as PossibleTypeExtensionsRule,
} from './rules/PossibleTypeExtensions';