diff --git a/src/execution/execute.js b/src/execution/execute.js index 9ea2faa6c5..024cb0f5a9 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -244,6 +244,8 @@ function buildResponse( /** * Essential assertions before executing to provide developer feedback for * improper use of the GraphQL library. + * + * @internal */ export function assertValidExecutionArguments( schema: GraphQLSchema, @@ -267,6 +269,8 @@ export function assertValidExecutionArguments( * execute, which we will pass throughout the other execution methods. * * Throws a GraphQLError if a valid execution context cannot be created. + * + * @internal */ export function buildExecutionContext( schema: GraphQLSchema, @@ -465,6 +469,8 @@ function executeFields( * CollectFields requires the "runtime type" of an object. For a field which * returns an Interface or Union type, the "runtime type" will be the actual * Object type returned by that field. + * + * @internal */ export function collectFields( exeContext: ExecutionContext, @@ -641,6 +647,9 @@ function resolveField( ); } +/** + * @internal + */ export function buildResolveInfo( exeContext: ExecutionContext, fieldDef: GraphQLField, @@ -664,8 +673,12 @@ export function buildResolveInfo( }; } -// Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField` -// function. Returns the result of resolveFn or the abrupt-return Error object. +/** + * Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField` + * function. Returns the result of resolveFn or the abrupt-return Error object. + * + * @internal + */ export function resolveFieldValueOrError( exeContext: ExecutionContext, fieldDef: GraphQLField, @@ -1192,6 +1205,8 @@ export const defaultFieldResolver: GraphQLFieldResolver< * are allowed, like on a Union. __schema could get automatically * added to the query type, but that would require mutating type * definitions, which would cause issues. + * + * @internal */ export function getFieldDef( schema: GraphQLSchema, diff --git a/src/execution/values.js b/src/execution/values.js index d56132bf79..1d09672e5f 100644 --- a/src/execution/values.js +++ b/src/execution/values.js @@ -41,6 +41,8 @@ type CoercedVariableValues = * Note: The returned value is a plain Object with a prototype, since it is * exposed to user code. Care should be taken to not pull values from the * Object prototype. + * + * @internal */ export function getVariableValues( schema: GraphQLSchema, @@ -153,6 +155,8 @@ function coerceVariableValues( * Note: The returned value is a plain Object with a prototype, since it is * exposed to user code. Care should be taken to not pull values from the * Object prototype. + * + * @internal */ export function getArgumentValues( def: GraphQLField | GraphQLDirective, diff --git a/src/language/blockString.js b/src/language/blockString.js index 913fad521d..dba151a125 100644 --- a/src/language/blockString.js +++ b/src/language/blockString.js @@ -5,6 +5,8 @@ * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. * * This implements the GraphQL spec's BlockStringValue() static algorithm. + * + * @internal */ export function dedentBlockStringValue(rawString: string): string { // Expand a block string's raw value into independent lines. @@ -30,8 +32,9 @@ export function dedentBlockStringValue(rawString: string): string { // Return a string of the lines joined with U+000A. return lines.join('\n'); } - -// @internal +/** + * @internal + */ export function getBlockStringIndentation( lines: $ReadOnlyArray, ): number { @@ -71,6 +74,8 @@ function isBlank(str) { * Print a block string in the indented block form by adding a leading and * trailing blank line. However, if a block string starts with whitespace and is * a single-line, adding a leading blank line would strip that whitespace. + * + * @internal */ export function printBlockString( value: string, diff --git a/src/language/lexer.js b/src/language/lexer.js index b94b0d65ea..b200ef7071 100644 --- a/src/language/lexer.js +++ b/src/language/lexer.js @@ -93,7 +93,9 @@ export type Lexer = { ... }; -// @internal +/** + * @internal + */ export function isPunctuatorTokenKind(kind: TokenKindEnum) { return ( kind === TokenKind.BANG || diff --git a/src/type/definition.js b/src/type/definition.js index 9d1f2133c8..ffa21c7a52 100644 --- a/src/type/definition.js +++ b/src/type/definition.js @@ -822,6 +822,9 @@ function fieldsToFieldsConfig(fields) { })); } +/** + * @internal + */ export function argsToArgsConfig( args: $ReadOnlyArray, ): GraphQLFieldConfigArgumentMap { diff --git a/src/validation/rules/KnownArgumentNames.js b/src/validation/rules/KnownArgumentNames.js index 25a539df1e..7bcee2b072 100644 --- a/src/validation/rules/KnownArgumentNames.js +++ b/src/validation/rules/KnownArgumentNames.js @@ -45,7 +45,9 @@ export function KnownArgumentNames(context: ValidationContext): ASTVisitor { }; } -// @internal +/** + * @internal + */ export function KnownArgumentNamesOnDirectives( context: ValidationContext | SDLValidationContext, ): ASTVisitor { diff --git a/src/validation/rules/ProvidedRequiredArguments.js b/src/validation/rules/ProvidedRequiredArguments.js index 2a019304b2..99151aa732 100644 --- a/src/validation/rules/ProvidedRequiredArguments.js +++ b/src/validation/rules/ProvidedRequiredArguments.js @@ -71,7 +71,9 @@ export function ProvidedRequiredArguments( }; } -// @internal +/** + * @internal + */ export function ProvidedRequiredArgumentsOnDirectives( context: ValidationContext | SDLValidationContext, ): ASTVisitor { diff --git a/src/validation/specifiedRules.js b/src/validation/specifiedRules.js index 1d0c48788b..017b25191f 100644 --- a/src/validation/specifiedRules.js +++ b/src/validation/specifiedRules.js @@ -60,7 +60,7 @@ import { UniqueDirectivesPerLocation } from './rules/UniqueDirectivesPerLocation // Spec Section: "Argument Names" import { KnownArgumentNames, - KnownArgumentNamesOnDirectives, // @internal + KnownArgumentNamesOnDirectives, } from './rules/KnownArgumentNames'; // Spec Section: "Argument Uniqueness" @@ -72,7 +72,7 @@ import { ValuesOfCorrectType } from './rules/ValuesOfCorrectType'; // Spec Section: "Argument Optionality" import { ProvidedRequiredArguments, - ProvidedRequiredArgumentsOnDirectives, // @internal + ProvidedRequiredArgumentsOnDirectives, } from './rules/ProvidedRequiredArguments'; // Spec Section: "All Variable Usages Are Allowed" @@ -127,7 +127,9 @@ import { UniqueFieldDefinitionNames } from './rules/UniqueFieldDefinitionNames'; import { UniqueDirectiveNames } from './rules/UniqueDirectiveNames'; import { PossibleTypeExtensions } from './rules/PossibleTypeExtensions'; -// @internal +/** + * @internal + */ export const specifiedSDLRules = Object.freeze([ LoneSchemaDefinition, UniqueOperationTypes, diff --git a/src/validation/validate.js b/src/validation/validate.js index 41485ee317..42f5f269bf 100644 --- a/src/validation/validate.js +++ b/src/validation/validate.js @@ -82,7 +82,9 @@ export function validate( return errors; } -// @internal +/** + * @internal + */ export function validateSDL( documentAST: DocumentNode, schemaToExtend?: ?GraphQLSchema, diff --git a/tstypes/language/blockString.d.ts b/tstypes/language/blockString.d.ts index 7a9a5f7a82..a25329b3f4 100644 --- a/tstypes/language/blockString.d.ts +++ b/tstypes/language/blockString.d.ts @@ -6,7 +6,9 @@ */ export function dedentBlockStringValue(rawString: string): string; -// @internal +/** + * @internal + */ export function getBlockStringIndentation(lines: ReadonlyArray): number; /** diff --git a/tstypes/language/directiveLocation.d.ts b/tstypes/language/directiveLocation.d.ts index 7b1bd51bca..31365f5901 100644 --- a/tstypes/language/directiveLocation.d.ts +++ b/tstypes/language/directiveLocation.d.ts @@ -3,7 +3,9 @@ */ export const DirectiveLocation: _DirectiveLocation; -// @internal +/** + * @internal + */ type _DirectiveLocation = { // Request Definitions QUERY: 'QUERY'; diff --git a/tstypes/language/kinds.d.ts b/tstypes/language/kinds.d.ts index f61ace5fc4..e655af00d8 100644 --- a/tstypes/language/kinds.d.ts +++ b/tstypes/language/kinds.d.ts @@ -3,7 +3,9 @@ */ export const Kind: _Kind; -// @internal +/** + * @internal + */ type _Kind = { // Name NAME: 'Name'; diff --git a/tstypes/utilities/findBreakingChanges.d.ts b/tstypes/utilities/findBreakingChanges.d.ts index 87fa0c028e..afc2694598 100644 --- a/tstypes/utilities/findBreakingChanges.d.ts +++ b/tstypes/utilities/findBreakingChanges.d.ts @@ -4,7 +4,9 @@ import { DirectiveLocationEnum } from '../language/directiveLocation'; export const BreakingChangeType: _BreakingChangeType; -// @internal +/** + * @internal + */ type _BreakingChangeType = { TYPE_REMOVED: 'TYPE_REMOVED'; TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND'; @@ -25,7 +27,9 @@ type _BreakingChangeType = { export const DangerousChangeType: _DangerousChangeType; -// @internal +/** + * @internal + */ type _DangerousChangeType = { VALUE_ADDED_TO_ENUM: 'VALUE_ADDED_TO_ENUM'; TYPE_ADDED_TO_UNION: 'TYPE_ADDED_TO_UNION'; diff --git a/tstypes/validation/rules/KnownArgumentNames.d.ts b/tstypes/validation/rules/KnownArgumentNames.d.ts index 33541a7906..5ff0033dbd 100644 --- a/tstypes/validation/rules/KnownArgumentNames.d.ts +++ b/tstypes/validation/rules/KnownArgumentNames.d.ts @@ -9,7 +9,9 @@ import { ASTVisitor } from '../../language/visitor'; */ export function KnownArgumentNames(context: ValidationContext): ASTVisitor; -// @internal +/** + * @internal + */ export function KnownArgumentNamesOnDirectives( context: ValidationContext | SDLValidationContext, ): ASTVisitor; diff --git a/tstypes/validation/rules/ProvidedRequiredArguments.d.ts b/tstypes/validation/rules/ProvidedRequiredArguments.d.ts index 4a02ae6151..d67e2fceb7 100644 --- a/tstypes/validation/rules/ProvidedRequiredArguments.d.ts +++ b/tstypes/validation/rules/ProvidedRequiredArguments.d.ts @@ -11,7 +11,9 @@ export function ProvidedRequiredArguments( context: ValidationContext, ): ASTVisitor; -// @internal +/** + * @internal + */ export function ProvidedRequiredArgumentsOnDirectives( context: ValidationContext | SDLValidationContext, ): ASTVisitor; diff --git a/tstypes/validation/specifiedRules.d.ts b/tstypes/validation/specifiedRules.d.ts index e26fae8980..61ad92e72c 100644 --- a/tstypes/validation/specifiedRules.d.ts +++ b/tstypes/validation/specifiedRules.d.ts @@ -60,7 +60,7 @@ import { UniqueDirectivesPerLocation } from './rules/UniqueDirectivesPerLocation // Spec Section: "Argument Names" import { KnownArgumentNames, - KnownArgumentNamesOnDirectives, // @internal + KnownArgumentNamesOnDirectives, } from './rules/KnownArgumentNames'; // Spec Section: "Argument Uniqueness" @@ -72,7 +72,7 @@ import { ValuesOfCorrectType } from './rules/ValuesOfCorrectType'; // Spec Section: "Argument Optionality" import { ProvidedRequiredArguments, - ProvidedRequiredArgumentsOnDirectives, // @internal + ProvidedRequiredArgumentsOnDirectives, } from './rules/ProvidedRequiredArguments'; // Spec Section: "All Variable Usages Are Allowed" @@ -94,5 +94,7 @@ export const specifiedRules: ReadonlyArray; import { LoneSchemaDefinition } from './rules/LoneSchemaDefinition'; -// @internal +/** + * @internal + */ export const specifiedSDLRules: ReadonlyArray; diff --git a/tstypes/validation/validate.d.ts b/tstypes/validation/validate.d.ts index a4baff7f73..492af890f1 100644 --- a/tstypes/validation/validate.d.ts +++ b/tstypes/validation/validate.d.ts @@ -29,7 +29,9 @@ export function validate( options?: { maxErrors?: number }, ): ReadonlyArray; -// @internal +/** + * @internal + */ export function validateSDL( documentAST: DocumentNode, schemaToExtend?: Maybe,