Comparing version
@@ -95,2 +95,7 @@ import type { Maybe } from '../jsutils/Maybe'; | ||
subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>; | ||
/** Additional execution options. */ | ||
options?: { | ||
/** Set the maximum number of errors allowed for coercing (defaults to 50). */ | ||
maxCoercionErrors?: number; | ||
}; | ||
} | ||
@@ -97,0 +102,0 @@ /** |
@@ -213,3 +213,3 @@ 'use strict'; | ||
function buildExecutionContext(args) { | ||
var _definition$name, _operation$variableDe; | ||
var _definition$name, _operation$variableDe, _options$maxCoercionE; | ||
@@ -226,2 +226,3 @@ const { | ||
subscribeFieldResolver, | ||
options, | ||
} = args; | ||
@@ -289,3 +290,10 @@ let operation; | ||
{ | ||
maxErrors: 50, | ||
maxErrors: | ||
(_options$maxCoercionE = | ||
options === null || options === void 0 | ||
? void 0 | ||
: options.maxCoercionErrors) !== null && | ||
_options$maxCoercionE !== void 0 | ||
? _options$maxCoercionE | ||
: 50, | ||
}, | ||
@@ -292,0 +300,0 @@ ); |
@@ -148,6 +148,3 @@ 'use strict'; | ||
} else { | ||
node = Object.defineProperties( | ||
{}, | ||
Object.getOwnPropertyDescriptors(node), | ||
); | ||
node = { ...node }; | ||
@@ -154,0 +151,0 @@ for (const [editKey, editValue] of edits) { |
{ | ||
"name": "graphql", | ||
"version": "16.10.0", | ||
"version": "16.11.0", | ||
"description": "A Query Language and Runtime which can target any service.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
[](https://graphql.org/conf/2024/?utm_source=github&utm_medium=graphql_js&utm_campaign=readme) | ||
[](https://graphql.org/conf/2025/?utm_source=github&utm_medium=graphql_js&utm_campaign=readme) | ||
@@ -3,0 +3,0 @@ # GraphQL.js |
@@ -83,3 +83,6 @@ 'use strict'; | ||
if ((0, _definition.isInputObjectType)(type)) { | ||
if (!(0, _isObjectLike.isObjectLike)(inputValue)) { | ||
if ( | ||
!(0, _isObjectLike.isObjectLike)(inputValue) || | ||
Array.isArray(inputValue) | ||
) { | ||
onError( | ||
@@ -86,0 +89,0 @@ (0, _Path.pathToArray)(path), |
@@ -38,3 +38,3 @@ 'use strict'; | ||
for (const { node, type, defaultValue } of usages) { | ||
for (const { node, type, defaultValue, parentType } of usages) { | ||
const varName = node.name.value; | ||
@@ -73,2 +73,17 @@ const varDef = varDefMap[varName]; | ||
} | ||
if ( | ||
(0, _definition.isInputObjectType)(parentType) && | ||
parentType.isOneOf && | ||
(0, _definition.isNullableType)(varType) | ||
) { | ||
context.reportError( | ||
new _GraphQLError.GraphQLError( | ||
`Variable "$${varName}" is of type "${varType}" but must be non-nullable to be used for OneOf Input Object "${parentType}".`, | ||
{ | ||
nodes: [varDef, node], | ||
}, | ||
), | ||
); | ||
} | ||
} | ||
@@ -75,0 +90,0 @@ } |
@@ -30,2 +30,3 @@ import type { Maybe } from '../jsutils/Maybe'; | ||
readonly defaultValue: Maybe<unknown>; | ||
readonly parentType: Maybe<GraphQLInputType>; | ||
} | ||
@@ -32,0 +33,0 @@ /** |
@@ -171,2 +171,3 @@ 'use strict'; | ||
defaultValue: typeInfo.getDefaultValue(), | ||
parentType: typeInfo.getParentInputType(), | ||
}); | ||
@@ -173,0 +174,0 @@ }, |
@@ -13,3 +13,3 @@ 'use strict'; | ||
*/ | ||
const version = '16.10.0'; | ||
const version = '16.11.0'; | ||
/** | ||
@@ -22,3 +22,3 @@ * An object containing the components of the GraphQL.js version string | ||
major: 16, | ||
minor: 10, | ||
minor: 11, | ||
patch: 0, | ||
@@ -25,0 +25,0 @@ preReleaseTag: null, |
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
1365791
0.14%42610
0.12%