-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync validation TS definitions with flow (#2119)
* Sync tstypes/validation TS definitions with Flow Note: not tstypes/validation/rules yet * Sync validation/rules TS with Flow
- Loading branch information
1 parent
7b9bfda
commit 9c3e816
Showing
36 changed files
with
176 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { ValidationContext } from '../ValidationContext'; | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { ValidationContext } from '../ValidationContext'; | ||
|
||
export function cycleErrorMessage( | ||
fragName: string, | ||
spreadNames: Array<string>, | ||
spreadNames: ReadonlyArray<string>, | ||
): string; | ||
|
||
export function NoFragmentCycles(context: ValidationContext): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { SDLValidationContext } from '../ValidationContext'; | ||
|
||
export function extendingUnknownTypeMessage( | ||
typeName: string, | ||
suggestedTypes: $ReadOnlyArray<string>, | ||
): string; | ||
|
||
export function extendingDifferentTypeKindMessage( | ||
typeName: string, | ||
kind: string, | ||
): string; | ||
|
||
/** | ||
* Possible type extension | ||
* | ||
* A type extension is only valid if the type is defined and has the same kind. | ||
*/ | ||
export function PossibleTypeExtensions( | ||
context: SDLValidationContext, | ||
): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { ASTValidationContext } from '../ValidationContext'; | ||
|
||
export function duplicateDirectiveNameMessage(directiveName: string): string; | ||
|
||
export function existedDirectiveNameMessage(directiveName: string): string; | ||
|
||
/** | ||
* Unique directive names | ||
* | ||
* A GraphQL document is only valid if all defined directives have unique names. | ||
*/ | ||
export function UniqueDirectiveNames(context: SDLValidationContext): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { SDLValidationContext } from '../ValidationContext'; | ||
|
||
export function duplicateEnumValueNameMessage( | ||
typeName: string, | ||
valueName: string, | ||
): string; | ||
|
||
export function existedEnumValueNameMessage( | ||
typeName: string, | ||
valueName: string, | ||
): string; | ||
|
||
/** | ||
* Unique enum value names | ||
* | ||
* A GraphQL enum type is only valid if all its values are uniquely named. | ||
*/ | ||
export function UniqueEnumValueNames(context: SDLValidationContext): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { SDLValidationContext } from '../ValidationContext'; | ||
|
||
export function duplicateFieldDefinitionNameMessage( | ||
typeName: string, | ||
fieldName: string, | ||
): string; | ||
|
||
export function existedFieldDefinitionNameMessage( | ||
typeName: string, | ||
fieldName: string, | ||
): string; | ||
|
||
/** | ||
* Unique field definition names | ||
* | ||
* A GraphQL complex type is only valid if all its fields are uniquely named. | ||
*/ | ||
export function UniqueFieldDefinitionNames( | ||
context: SDLValidationContext, | ||
): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { SDLValidationContext } from '../ValidationContext'; | ||
|
||
export function duplicateOperationTypeMessage(operation: string): string; | ||
|
||
export function existedOperationTypeMessage(operation: string): string; | ||
|
||
/** | ||
* Unique operation types | ||
* | ||
* A GraphQL document is only valid if it has only one type per operation. | ||
*/ | ||
export function UniqueOperationTypes(context: SDLValidationContext): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ASTVisitor } from '../../language/visitor'; | ||
import { SDLValidationContext } from '../ValidationContext'; | ||
|
||
export function duplicateTypeNameMessage(typeName: string): string; | ||
|
||
export function existedTypeNameMessage(typeName: string): string; | ||
|
||
/** | ||
* Unique type names | ||
* | ||
* A GraphQL document is only valid if all defined types have unique names. | ||
*/ | ||
export function UniqueTypeNames(context: SDLValidationContext): ASTVisitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.