Comparing version 16.3.0-canary.pr.3418.662180be9091ee1edf699b4cf4922bd5b7705297 to 16.3.0-canary.pr.3465.6c6701425310ce7f866ce71628bdf9443ae0f0af
@@ -78,2 +78,3 @@ import type { Maybe } from '../jsutils/Maybe'; | ||
readonly extensions: GraphQLErrorExtensions; | ||
constructor(message: string, args?: GraphQLErrorArgs); | ||
/** | ||
@@ -95,3 +96,2 @@ * @deprecated Please use the `GraphQLErrorArgs` constructor overload instead. | ||
); | ||
constructor(message: string, args?: GraphQLErrorArgs); | ||
get [Symbol.toStringTag](): string; | ||
@@ -98,0 +98,0 @@ toString(): string; |
@@ -26,12 +26,12 @@ 'use strict'; | ||
return new _GraphQLError.GraphQLError( | ||
originalError.message, | ||
(_nodes = originalError.nodes) !== null && _nodes !== void 0 | ||
? _nodes | ||
: nodes, | ||
originalError.source, | ||
originalError.positions, | ||
return new _GraphQLError.GraphQLError(originalError.message, { | ||
nodes: | ||
(_nodes = originalError.nodes) !== null && _nodes !== void 0 | ||
? _nodes | ||
: nodes, | ||
source: originalError.source, | ||
positions: originalError.positions, | ||
path, | ||
originalError, | ||
); | ||
}); | ||
} | ||
@@ -38,0 +38,0 @@ |
@@ -15,8 +15,6 @@ 'use strict'; | ||
function syntaxError(source, position, description) { | ||
return new _GraphQLError.GraphQLError( | ||
`Syntax Error: ${description}`, | ||
undefined, | ||
return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, { | ||
source, | ||
[position], | ||
); | ||
positions: [position], | ||
}); | ||
} |
@@ -327,3 +327,5 @@ 'use strict'; | ||
`Schema is not configured to execute ${operation.operation} operation.`, | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
@@ -846,3 +848,5 @@ } | ||
`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
); | ||
@@ -854,3 +858,5 @@ } | ||
`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
); | ||
@@ -862,3 +868,5 @@ } | ||
`Runtime Object type "${runtimeType.name}" is not a possible type for "${returnType.name}".`, | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
); | ||
@@ -917,3 +925,5 @@ } | ||
_inspect.inspect)(result)}.`, | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
); | ||
@@ -920,0 +930,0 @@ } |
@@ -193,3 +193,5 @@ 'use strict'; | ||
'Schema is not configured to execute subscription operation.', | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
@@ -212,3 +214,5 @@ } | ||
`The subscription field "${fieldName}" is not defined.`, | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
); | ||
@@ -215,0 +219,0 @@ } |
@@ -88,3 +88,5 @@ 'use strict'; | ||
`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, | ||
varDefNode.type, | ||
{ | ||
nodes: varDefNode.type, | ||
}, | ||
), | ||
@@ -106,3 +108,5 @@ ); | ||
`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, | ||
varDefNode, | ||
{ | ||
nodes: varDefNode, | ||
}, | ||
), | ||
@@ -122,3 +126,5 @@ ); | ||
`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, | ||
varDefNode, | ||
{ | ||
nodes: varDefNode, | ||
}, | ||
), | ||
@@ -144,10 +150,6 @@ ); | ||
onError( | ||
new _GraphQLError.GraphQLError( | ||
prefix + '; ' + error.message, | ||
varDefNode, | ||
undefined, | ||
undefined, | ||
undefined, | ||
error.originalError, | ||
), | ||
new _GraphQLError.GraphQLError(prefix + '; ' + error.message, { | ||
nodes: varDefNode, | ||
originalError: error.originalError, | ||
}), | ||
); | ||
@@ -198,3 +200,5 @@ }, | ||
)}" ` + 'was not provided.', | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
); | ||
@@ -224,3 +228,5 @@ } | ||
`was provided the variable "$${variableName}" which was not provided a runtime value.`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -240,3 +246,5 @@ } | ||
)}" ` + 'must not be null.', | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -259,3 +267,5 @@ } | ||
)}.`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -262,0 +272,0 @@ } |
@@ -217,3 +217,2 @@ /** | ||
DirectiveLocationEnum, | ||
ASTReducer, | ||
ASTVisitor, | ||
@@ -235,6 +234,2 @@ ASTVisitFn, | ||
ArgumentNode, | ||
NullabilityDesignatorNode, | ||
RequiredDesignatorNode, | ||
OptionalDesignatorNode, | ||
ListNullabilityNode, | ||
ConstArgumentNode, | ||
@@ -241,0 +236,0 @@ FragmentSpreadNode, |
@@ -137,6 +137,3 @@ import type { Kind } from './kinds'; | ||
| EnumTypeExtensionNode | ||
| InputObjectTypeExtensionNode | ||
| RequiredDesignatorNode | ||
| OptionalDesignatorNode | ||
| ListNullabilityNode; | ||
| InputObjectTypeExtensionNode; | ||
/** | ||
@@ -219,24 +216,5 @@ * Utility type listing all nodes indexed by their kind. | ||
readonly arguments?: ReadonlyArray<ArgumentNode>; | ||
readonly required?: ListNullabilityNode | NullabilityDesignatorNode; | ||
readonly directives?: ReadonlyArray<DirectiveNode>; | ||
readonly selectionSet?: SelectionSetNode; | ||
} | ||
export interface RequiredDesignatorNode { | ||
readonly kind: Kind.REQUIRED_DESIGNATOR; | ||
readonly loc?: Location; | ||
readonly element?: ListNullabilityNode; | ||
} | ||
export interface OptionalDesignatorNode { | ||
readonly kind: Kind.OPTIONAL_DESIGNATOR; | ||
readonly loc?: Location; | ||
readonly element?: ListNullabilityNode; | ||
} | ||
export interface ListNullabilityNode { | ||
readonly kind: Kind.LIST_NULLABILITY; | ||
readonly loc?: Location; | ||
readonly element?: NullabilityDesignatorNode | ListNullabilityNode; | ||
} | ||
export declare type NullabilityDesignatorNode = | ||
| RequiredDesignatorNode | ||
| OptionalDesignatorNode; | ||
export interface ArgumentNode { | ||
@@ -243,0 +221,0 @@ readonly kind: Kind.ARGUMENT; |
@@ -142,16 +142,3 @@ 'use strict'; | ||
SelectionSet: ['selections'], | ||
Field: [ | ||
'alias', | ||
'name', | ||
'arguments', | ||
'directives', | ||
'selectionSet', // Note: Client Controlled Nullability is experimental and may be changed | ||
// or removed in the future. | ||
'required', | ||
], | ||
// Note: Client Controlled Nullability is experimental and may be changed | ||
// or removed in the future. | ||
ListNullability: ['element'], | ||
RequiredDesignator: ['element'], | ||
OptionalDesignator: ['element'], | ||
Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], | ||
Argument: ['name', 'value'], | ||
@@ -158,0 +145,0 @@ FragmentSpread: ['name', 'directives'], |
@@ -20,8 +20,3 @@ export { Source } from './source'; | ||
} from './visitor'; | ||
export type { | ||
ASTVisitor, | ||
ASTVisitFn, | ||
ASTVisitorKeyMap, | ||
ASTReducer, | ||
} from './visitor'; | ||
export type { ASTVisitor, ASTVisitFn, ASTVisitorKeyMap } from './visitor'; | ||
export { Location, Token, OperationTypeNode } from './ast'; | ||
@@ -41,6 +36,2 @@ export type { | ||
FieldNode, | ||
NullabilityDesignatorNode, | ||
RequiredDesignatorNode, | ||
OptionalDesignatorNode, | ||
ListNullabilityNode, | ||
ArgumentNode, | ||
@@ -47,0 +38,0 @@ ConstArgumentNode, |
@@ -18,5 +18,2 @@ /** | ||
FRAGMENT_DEFINITION = 'FragmentDefinition', | ||
LIST_NULLABILITY = 'ListNullability', | ||
REQUIRED_DESIGNATOR = 'RequiredDesignator', | ||
OPTIONAL_DESIGNATOR = 'OptionalDesignator', | ||
/** Values */ | ||
@@ -23,0 +20,0 @@ VARIABLE = 'Variable', |
@@ -31,5 +31,2 @@ 'use strict'; | ||
Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition'; | ||
Kind['LIST_NULLABILITY'] = 'ListNullability'; | ||
Kind['REQUIRED_DESIGNATOR'] = 'RequiredDesignator'; | ||
Kind['OPTIONAL_DESIGNATOR'] = 'OptionalDesignator'; | ||
Kind['VARIABLE'] = 'Variable'; | ||
@@ -36,0 +33,0 @@ Kind['INT'] = 'IntValue'; |
@@ -106,3 +106,2 @@ 'use strict'; | ||
kind === _tokenKind.TokenKind.BANG || | ||
kind === _tokenKind.TokenKind.QUESTION_MARK || | ||
kind === _tokenKind.TokenKind.DOLLAR || | ||
@@ -400,11 +399,2 @@ kind === _tokenKind.TokenKind.AMP || | ||
); | ||
case 0x003f: | ||
// ? | ||
return createToken( | ||
lexer, | ||
_tokenKind.TokenKind.QUESTION_MARK, | ||
position, | ||
position + 1, | ||
); | ||
// StringValue | ||
@@ -411,0 +401,0 @@ |
@@ -28,7 +28,5 @@ import type { Maybe } from '../jsutils/Maybe'; | ||
InterfaceTypeExtensionNode, | ||
ListNullabilityNode, | ||
ListValueNode, | ||
NamedTypeNode, | ||
NameNode, | ||
NullabilityDesignatorNode, | ||
ObjectFieldNode, | ||
@@ -40,4 +38,2 @@ ObjectTypeDefinitionNode, | ||
OperationTypeDefinitionNode, | ||
OptionalDesignatorNode, | ||
RequiredDesignatorNode, | ||
ScalarTypeDefinitionNode, | ||
@@ -89,24 +85,2 @@ ScalarTypeExtensionNode, | ||
allowLegacyFragmentVariables?: boolean; | ||
/** | ||
* EXPERIMENTAL: | ||
* | ||
* If enabled, the parser will understand and parse Client Controlled Nullability | ||
* Designators contained in Fields. They'll be represented in the | ||
* `required` field of the FieldNode. | ||
* | ||
* The syntax looks like the following: | ||
* | ||
* ```graphql | ||
* { | ||
* nullableField! | ||
* nonNullableField? | ||
* nonNullableSelectionSet? { | ||
* childField! | ||
* } | ||
* } | ||
* ``` | ||
* Note: this feature is experimental and may change or be removed in the | ||
* future. | ||
*/ | ||
experimentalClientControlledNullability?: boolean; | ||
} | ||
@@ -246,22 +220,2 @@ /** | ||
/** | ||
* Nullability : | ||
* - ! | ||
* - ? | ||
* | ||
*/ | ||
parseRequiredStatus(): | ||
| NullabilityDesignatorNode | ||
| ListNullabilityNode | ||
| undefined; | ||
parseListNullability(): ListNullabilityNode | undefined; | ||
parseNullabilityDesignatorNode( | ||
childElement?: ListNullabilityNode, | ||
): NullabilityDesignatorNode | undefined; | ||
parseRequiredDesignatorNode( | ||
childElement?: ListNullabilityNode, | ||
): RequiredDesignatorNode | undefined; | ||
parseOptionalDesignatorNode( | ||
childElement?: ListNullabilityNode, | ||
): OptionalDesignatorNode | undefined; | ||
/** | ||
* Arguments[Const] : ( Argument[?Const]+ ) | ||
@@ -268,0 +222,0 @@ */ |
@@ -345,4 +345,2 @@ 'use strict'; | ||
parseField() { | ||
var _this$_options; | ||
const start = this._lexer.token; | ||
@@ -365,11 +363,2 @@ const nameOrAlias = this.parseName(); | ||
arguments: this.parseArguments(false), | ||
// Experimental support for Client Controlled Nullability changes | ||
// the grammar of Field: | ||
// - Field : Alias? Name Arguments? Nullability? Directives? SelectionSet? | ||
required: | ||
(_this$_options = this._options) !== null && | ||
_this$_options !== void 0 && | ||
_this$_options.experimentalClientControlledNullability | ||
? this.parseRequiredStatus() | ||
: undefined, | ||
directives: this.parseDirectives(false), | ||
@@ -382,61 +371,2 @@ selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) | ||
/** | ||
* Nullability : | ||
* - ! | ||
* - ? | ||
* | ||
*/ | ||
parseRequiredStatus() { | ||
const list = this.parseListNullability(); | ||
const nullabilityStatus = this.parseNullabilityDesignatorNode(list); | ||
return nullabilityStatus !== null && nullabilityStatus !== void 0 | ||
? nullabilityStatus | ||
: list; | ||
} | ||
parseListNullability() { | ||
const start = this._lexer.token; | ||
if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) { | ||
const child = this.parseRequiredStatus(); | ||
this.expectToken(_tokenKind.TokenKind.BRACKET_R); | ||
return this.node(start, { | ||
kind: _kinds.Kind.LIST_NULLABILITY, | ||
element: child, | ||
}); | ||
} | ||
} | ||
parseNullabilityDesignatorNode(childElement) { | ||
var _this$parseRequiredDe; | ||
return (_this$parseRequiredDe = | ||
this.parseRequiredDesignatorNode(childElement)) !== null && | ||
_this$parseRequiredDe !== void 0 | ||
? _this$parseRequiredDe | ||
: this.parseOptionalDesignatorNode(childElement); | ||
} | ||
parseRequiredDesignatorNode(childElement) { | ||
const start = this._lexer.token; | ||
if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) { | ||
return this.node(start, { | ||
kind: _kinds.Kind.REQUIRED_DESIGNATOR, | ||
element: childElement, | ||
}); | ||
} | ||
} | ||
parseOptionalDesignatorNode(childElement) { | ||
const start = this._lexer.token; | ||
if (this.expectOptionalToken(_tokenKind.TokenKind.QUESTION_MARK)) { | ||
return this.node(start, { | ||
kind: _kinds.Kind.OPTIONAL_DESIGNATOR, | ||
element: childElement, | ||
}); | ||
} | ||
} | ||
/** | ||
* Arguments[Const] : ( Argument[?Const]+ ) | ||
@@ -508,3 +438,3 @@ */ | ||
parseFragmentDefinition() { | ||
var _this$_options2; | ||
var _this$_options; | ||
@@ -517,5 +447,5 @@ const start = this._lexer.token; | ||
if ( | ||
((_this$_options2 = this._options) === null || _this$_options2 === void 0 | ||
((_this$_options = this._options) === null || _this$_options === void 0 | ||
? void 0 | ||
: _this$_options2.allowLegacyFragmentVariables) === true | ||
: _this$_options.allowLegacyFragmentVariables) === true | ||
) { | ||
@@ -1451,8 +1381,8 @@ return this.node(start, { | ||
node(startToken, node) { | ||
var _this$_options3; | ||
var _this$_options2; | ||
if ( | ||
((_this$_options3 = this._options) === null || _this$_options3 === void 0 | ||
((_this$_options2 = this._options) === null || _this$_options2 === void 0 | ||
? void 0 | ||
: _this$_options3.noLocation) !== true | ||
: _this$_options2.noLocation) !== true | ||
) { | ||
@@ -1459,0 +1389,0 @@ node.loc = new _ast.Location( |
@@ -62,11 +62,4 @@ 'use strict'; | ||
Field: { | ||
leave({ | ||
alias, | ||
name, | ||
arguments: args, | ||
directives, | ||
selectionSet, | ||
required, | ||
}) { | ||
const prefix = join([wrap('', alias, ': '), name], ''); | ||
leave({ alias, name, arguments: args, directives, selectionSet }) { | ||
const prefix = wrap('', alias, ': ') + name; | ||
let argsLine = prefix + wrap('(', join(args, ', '), ')'); | ||
@@ -76,26 +69,7 @@ | ||
argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)'); | ||
} // Note: Client Controlled Nullability is experimental and may be changed | ||
// or removed in the future. | ||
} | ||
const requiredArgsLine = join([argsLine, required], ''); | ||
return join([requiredArgsLine, join(directives, ' '), selectionSet], ' '); | ||
return join([argsLine, join(directives, ' '), selectionSet], ' '); | ||
}, | ||
}, | ||
RequiredDesignator: { | ||
leave({ element }) { | ||
return (element !== null && element !== void 0 ? element : '') + '!'; | ||
}, | ||
}, | ||
OptionalDesignator: { | ||
leave({ element }) { | ||
return (element !== null && element !== void 0 ? element : '') + '?'; | ||
}, | ||
}, | ||
ListNullability: { | ||
leave({ element }) { | ||
return ( | ||
'[' + (element !== null && element !== void 0 ? element : '') + ']' | ||
); | ||
}, | ||
}, | ||
Argument: { | ||
@@ -102,0 +76,0 @@ leave: ({ name, value }) => name + ': ' + value, |
@@ -9,3 +9,2 @@ /** | ||
BANG = '!', | ||
QUESTION_MARK = '?', | ||
DOLLAR = '$', | ||
@@ -12,0 +11,0 @@ AMP = '&', |
@@ -25,3 +25,2 @@ 'use strict'; | ||
TokenKind['BANG'] = '!'; | ||
TokenKind['QUESTION_MARK'] = '?'; | ||
TokenKind['DOLLAR'] = '$'; | ||
@@ -28,0 +27,0 @@ TokenKind['AMP'] = '&'; |
{ | ||
"name": "graphql", | ||
"version": "16.3.0-canary.pr.3418.662180be9091ee1edf699b4cf4922bd5b7705297", | ||
"version": "16.3.0-canary.pr.3465.6c6701425310ce7f866ce71628bdf9443ae0f0af", | ||
"description": "A Query Language and Runtime which can target any service.", | ||
@@ -37,5 +37,5 @@ "license": "MIT", | ||
"publishConfig": { | ||
"tag": "canary-pr-3418" | ||
"tag": "canary-pr-3465" | ||
}, | ||
"deprecated": "You are using canary version build from https://api.github.com/repos/graphql/graphql-js/pulls/3418, no gurantees provided so please use your own discretion." | ||
"deprecated": "You are using canary version build from https://api.github.com/repos/graphql/graphql-js/pulls/3465, no gurantees provided so please use your own discretion." | ||
} |
@@ -1143,3 +1143,5 @@ 'use strict'; | ||
didYouMeanEnumValue(this, valueStr), | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -1155,3 +1157,5 @@ } | ||
didYouMeanEnumValue(this, valueStr), | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -1158,0 +1162,0 @@ } |
@@ -102,3 +102,5 @@ 'use strict'; | ||
)}`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -112,3 +114,5 @@ } | ||
`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -223,3 +227,5 @@ } | ||
)}`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -272,3 +278,5 @@ } | ||
)}`, | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -324,3 +332,5 @@ } | ||
(0, _printer.print)(valueNode), | ||
valueNode, | ||
{ | ||
nodes: valueNode, | ||
}, | ||
); | ||
@@ -327,0 +337,0 @@ } |
@@ -72,3 +72,7 @@ 'use strict'; | ||
this._errors.push(new _GraphQLError.GraphQLError(message, _nodes)); | ||
this._errors.push( | ||
new _GraphQLError.GraphQLError(message, { | ||
nodes: _nodes, | ||
}), | ||
); | ||
} | ||
@@ -75,0 +79,0 @@ |
@@ -161,7 +161,5 @@ 'use strict'; | ||
`Expected type "${type.name}". ` + error.message, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
error, | ||
{ | ||
originalError: error, | ||
}, | ||
), | ||
@@ -168,0 +166,0 @@ ); |
@@ -22,3 +22,5 @@ 'use strict'; | ||
'Schema does not define the required query root type.', | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
@@ -36,3 +38,5 @@ } | ||
'Schema is not configured for mutations.', | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
@@ -50,3 +54,5 @@ } | ||
'Schema is not configured for subscriptions.', | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
@@ -60,4 +66,6 @@ } | ||
'Can only have query, mutation and subscription operations.', | ||
operation, | ||
{ | ||
nodes: operation, | ||
}, | ||
); | ||
} |
@@ -39,3 +39,5 @@ 'use strict'; | ||
`The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -60,3 +62,5 @@ ); | ||
`Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -72,3 +76,5 @@ ); | ||
`Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -96,3 +102,5 @@ ); | ||
`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -119,3 +127,5 @@ ); | ||
`The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -122,0 +132,0 @@ ); |
@@ -33,3 +33,5 @@ 'use strict'; | ||
`GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -36,0 +38,0 @@ ); |
@@ -35,3 +35,5 @@ 'use strict'; | ||
`The ${defName} definition is not executable.`, | ||
definition, | ||
{ | ||
nodes: definition, | ||
}, | ||
), | ||
@@ -38,0 +40,0 @@ ); |
@@ -54,3 +54,5 @@ 'use strict'; | ||
suggestion, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -57,0 +59,0 @@ ); |
@@ -41,3 +41,5 @@ 'use strict'; | ||
`Fragment cannot condition on non composite type "${typeStr}".`, | ||
typeCondition, | ||
{ | ||
nodes: typeCondition, | ||
}, | ||
), | ||
@@ -60,3 +62,5 @@ ); | ||
`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, | ||
node.typeCondition, | ||
{ | ||
nodes: node.typeCondition, | ||
}, | ||
), | ||
@@ -63,0 +67,0 @@ ); |
@@ -49,3 +49,5 @@ 'use strict'; | ||
(0, _didYouMean.didYouMean)(suggestions), | ||
argNode, | ||
{ | ||
nodes: argNode, | ||
}, | ||
), | ||
@@ -107,3 +109,5 @@ ); | ||
(0, _didYouMean.didYouMean)(suggestions), | ||
argNode, | ||
{ | ||
nodes: argNode, | ||
}, | ||
), | ||
@@ -110,0 +114,0 @@ ); |
@@ -56,3 +56,5 @@ 'use strict'; | ||
context.reportError( | ||
new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, node), | ||
new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, { | ||
nodes: node, | ||
}), | ||
); | ||
@@ -68,3 +70,5 @@ return; | ||
`Directive "@${name}" may not be used on ${candidateLocation}.`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -71,0 +75,0 @@ ); |
@@ -28,3 +28,5 @@ 'use strict'; | ||
`Unknown fragment "${fragmentName}".`, | ||
node.name, | ||
{ | ||
nodes: node.name, | ||
}, | ||
), | ||
@@ -31,0 +33,0 @@ ); |
@@ -68,3 +68,5 @@ 'use strict'; | ||
(0, _didYouMean.didYouMean)(suggestedTypes), | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -71,0 +73,0 @@ ); |
@@ -34,3 +34,5 @@ 'use strict'; | ||
'This anonymous operation must be the only defined operation.', | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -37,0 +39,0 @@ ); |
@@ -45,3 +45,5 @@ 'use strict'; | ||
'Cannot define a new schema within a schema extension.', | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -56,3 +58,5 @@ ); | ||
'Must provide only one schema definition.', | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -59,0 +63,0 @@ ); |
@@ -73,3 +73,5 @@ 'use strict'; | ||
(viaPath !== '' ? ` via ${viaPath}.` : '.'), | ||
cyclePath, | ||
{ | ||
nodes: cyclePath, | ||
}, | ||
), | ||
@@ -76,0 +78,0 @@ ); |
@@ -38,3 +38,5 @@ 'use strict'; | ||
: `Variable "$${varName}" is not defined.`, | ||
[node, operation], | ||
{ | ||
nodes: [node, operation], | ||
}, | ||
), | ||
@@ -41,0 +43,0 @@ ); |
@@ -51,3 +51,5 @@ 'use strict'; | ||
`Fragment "${fragName}" is never used.`, | ||
fragmentDef, | ||
{ | ||
nodes: fragmentDef, | ||
}, | ||
), | ||
@@ -54,0 +56,0 @@ ); |
@@ -43,3 +43,5 @@ 'use strict'; | ||
: `Variable "$${variableName}" is never used.`, | ||
variableDef, | ||
{ | ||
nodes: variableDef, | ||
}, | ||
), | ||
@@ -46,0 +48,0 @@ ); |
@@ -69,3 +69,5 @@ 'use strict'; | ||
`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, | ||
fields1.concat(fields2), | ||
{ | ||
nodes: fields1.concat(fields2), | ||
}, | ||
), | ||
@@ -72,0 +74,0 @@ ); |
@@ -45,3 +45,5 @@ 'use strict'; | ||
`Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -71,3 +73,5 @@ ); | ||
`Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -74,0 +78,0 @@ ); |
@@ -67,3 +67,5 @@ 'use strict'; | ||
`Cannot extend non-${kindStr} type "${typeName}".`, | ||
defNode ? [defNode, node] : node, | ||
{ | ||
nodes: defNode ? [defNode, node] : node, | ||
}, | ||
), | ||
@@ -87,3 +89,5 @@ ); | ||
(0, _didYouMean.didYouMean)(suggestedTypes), | ||
node.name, | ||
{ | ||
nodes: node.name, | ||
}, | ||
), | ||
@@ -90,0 +94,0 @@ ); |
@@ -62,3 +62,5 @@ 'use strict'; | ||
`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, | ||
fieldNode, | ||
{ | ||
nodes: fieldNode, | ||
}, | ||
), | ||
@@ -144,3 +146,5 @@ ); | ||
`Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, | ||
directiveNode, | ||
{ | ||
nodes: directiveNode, | ||
}, | ||
), | ||
@@ -147,0 +151,0 @@ ); |
@@ -34,3 +34,5 @@ 'use strict'; | ||
`Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, | ||
selectionSet, | ||
{ | ||
nodes: selectionSet, | ||
}, | ||
), | ||
@@ -45,3 +47,5 @@ ); | ||
`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -48,0 +52,0 @@ ); |
@@ -58,3 +58,5 @@ 'use strict'; | ||
: 'Anonymous Subscription must select only one top level field.', | ||
extraFieldSelections, | ||
{ | ||
nodes: extraFieldSelections, | ||
}, | ||
), | ||
@@ -74,3 +76,5 @@ ); | ||
: 'Anonymous Subscription must not select an introspection top level field.', | ||
fieldNodes, | ||
{ | ||
nodes: fieldNodes, | ||
}, | ||
), | ||
@@ -77,0 +81,0 @@ ); |
@@ -82,3 +82,5 @@ 'use strict'; | ||
`Argument "${parentName}(${argName}:)" can only be defined once.`, | ||
argNodes.map((node) => node.name), | ||
{ | ||
nodes: argNodes.map((node) => node.name), | ||
}, | ||
), | ||
@@ -85,0 +87,0 @@ ); |
@@ -47,3 +47,5 @@ 'use strict'; | ||
`There can be only one argument named "${argName}".`, | ||
argNodes.map((node) => node.name), | ||
{ | ||
nodes: argNodes.map((node) => node.name), | ||
}, | ||
), | ||
@@ -50,0 +52,0 @@ ); |
@@ -30,3 +30,5 @@ 'use strict'; | ||
`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, | ||
node.name, | ||
{ | ||
nodes: node.name, | ||
}, | ||
), | ||
@@ -41,3 +43,5 @@ ); | ||
`There can be only one directive named "@${directiveName}".`, | ||
[knownDirectiveNames[directiveName], node.name], | ||
{ | ||
nodes: [knownDirectiveNames[directiveName], node.name], | ||
}, | ||
), | ||
@@ -44,0 +48,0 @@ ); |
@@ -83,3 +83,5 @@ 'use strict'; | ||
`The directive "@${directiveName}" can only be used once at this location.`, | ||
[seenDirectives[directiveName], directive], | ||
{ | ||
nodes: [seenDirectives[directiveName], directive], | ||
}, | ||
), | ||
@@ -86,0 +88,0 @@ ); |
@@ -54,3 +54,5 @@ 'use strict'; | ||
`Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, | ||
valueDef.name, | ||
{ | ||
nodes: valueDef.name, | ||
}, | ||
), | ||
@@ -62,3 +64,5 @@ ); | ||
`Enum value "${typeName}.${valueName}" can only be defined once.`, | ||
[valueNames[valueName], valueDef.name], | ||
{ | ||
nodes: [valueNames[valueName], valueDef.name], | ||
}, | ||
), | ||
@@ -65,0 +69,0 @@ ); |
@@ -54,3 +54,5 @@ 'use strict'; | ||
`Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, | ||
fieldDef.name, | ||
{ | ||
nodes: fieldDef.name, | ||
}, | ||
), | ||
@@ -62,3 +64,5 @@ ); | ||
`Field "${typeName}.${fieldName}" can only be defined once.`, | ||
[fieldNames[fieldName], fieldDef.name], | ||
{ | ||
nodes: [fieldNames[fieldName], fieldDef.name], | ||
}, | ||
), | ||
@@ -65,0 +69,0 @@ ); |
@@ -29,3 +29,5 @@ 'use strict'; | ||
`There can be only one fragment named "${fragmentName}".`, | ||
[knownFragmentNames[fragmentName], node.name], | ||
{ | ||
nodes: [knownFragmentNames[fragmentName], node.name], | ||
}, | ||
), | ||
@@ -32,0 +34,0 @@ ); |
@@ -44,3 +44,5 @@ 'use strict'; | ||
`There can be only one input field named "${fieldName}".`, | ||
[knownNames[fieldName], node.name], | ||
{ | ||
nodes: [knownNames[fieldName], node.name], | ||
}, | ||
), | ||
@@ -47,0 +49,0 @@ ); |
@@ -28,3 +28,8 @@ 'use strict'; | ||
`There can be only one operation named "${operationName.value}".`, | ||
[knownOperationNames[operationName.value], operationName], | ||
{ | ||
nodes: [ | ||
knownOperationNames[operationName.value], | ||
operationName, | ||
], | ||
}, | ||
), | ||
@@ -31,0 +36,0 @@ ); |
@@ -50,3 +50,5 @@ 'use strict'; | ||
`Type for ${operation} already defined in the schema. It cannot be redefined.`, | ||
operationType, | ||
{ | ||
nodes: operationType, | ||
}, | ||
), | ||
@@ -58,3 +60,5 @@ ); | ||
`There can be only one ${operation} type in schema.`, | ||
[alreadyDefinedOperationType, operationType], | ||
{ | ||
nodes: [alreadyDefinedOperationType, operationType], | ||
}, | ||
), | ||
@@ -61,0 +65,0 @@ ); |
@@ -34,3 +34,5 @@ 'use strict'; | ||
`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, | ||
node.name, | ||
{ | ||
nodes: node.name, | ||
}, | ||
), | ||
@@ -45,3 +47,5 @@ ); | ||
`There can be only one type named "${typeName}".`, | ||
[knownTypeNames[typeName], node.name], | ||
{ | ||
nodes: [knownTypeNames[typeName], node.name], | ||
}, | ||
), | ||
@@ -48,0 +52,0 @@ ); |
@@ -40,3 +40,5 @@ 'use strict'; | ||
`There can be only one variable named "$${variableName}".`, | ||
variableNodes.map((node) => node.variable.name), | ||
{ | ||
nodes: variableNodes.map((node) => node.variable.name), | ||
}, | ||
), | ||
@@ -43,0 +45,0 @@ ); |
@@ -66,3 +66,5 @@ 'use strict'; | ||
`Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -89,3 +91,5 @@ ); | ||
(0, _didYouMean.didYouMean)(suggestions), | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -105,3 +109,5 @@ ); | ||
)}", found ${(0, _printer.print)(node)}.`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -141,3 +147,5 @@ ); | ||
)}.`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -163,3 +171,5 @@ ); | ||
)}.`, | ||
node, | ||
{ | ||
nodes: node, | ||
}, | ||
), | ||
@@ -179,7 +189,6 @@ ); | ||
)}; ` + error.message, | ||
node, | ||
undefined, | ||
undefined, | ||
undefined, | ||
error, | ||
{ | ||
nodes: node, | ||
originalError: error, | ||
}, | ||
), | ||
@@ -186,0 +195,0 @@ ); |
@@ -38,3 +38,5 @@ 'use strict'; | ||
`Variable "$${variableName}" cannot be non-input type "${typeName}".`, | ||
node.type, | ||
{ | ||
nodes: node.type, | ||
}, | ||
), | ||
@@ -41,0 +43,0 @@ ); |
@@ -66,3 +66,5 @@ 'use strict'; | ||
`Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, | ||
[varDef, node], | ||
{ | ||
nodes: [varDef, node], | ||
}, | ||
), | ||
@@ -69,0 +71,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
1338171