graphql 16.0.1 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/error/GraphQLError.js +4 -1
- package/error/GraphQLError.mjs +4 -1
- package/error/locatedError.js +2 -8
- package/error/locatedError.mjs +2 -6
- package/execution/execute.js +16 -5
- package/execution/execute.mjs +16 -5
- package/execution/mapAsyncIterator.js +3 -1
- package/execution/mapAsyncIterator.mjs +3 -1
- package/execution/subscribe.js +8 -0
- package/execution/subscribe.mjs +7 -0
- package/execution/values.js +3 -2
- package/execution/values.mjs +3 -2
- package/graphql.js +8 -0
- package/graphql.mjs +7 -0
- package/index.d.ts +3 -0
- package/index.js +12 -0
- package/index.mjs +3 -0
- package/jsutils/devAssert.js +1 -1
- package/jsutils/devAssert.mjs +1 -1
- package/jsutils/instanceOf.js +3 -1
- package/jsutils/instanceOf.mjs +3 -1
- package/jsutils/invariant.js +1 -1
- package/jsutils/invariant.mjs +1 -1
- package/jsutils/mapValue.js +2 -2
- package/jsutils/mapValue.mjs +2 -2
- package/jsutils/toError.d.ts +4 -0
- package/jsutils/toError.js +25 -0
- package/jsutils/toError.mjs +18 -0
- package/language/blockString.d.ts +7 -3
- package/language/blockString.js +121 -64
- package/language/blockString.mjs +111 -62
- package/language/characterClasses.d.ts +9 -0
- package/language/characterClasses.js +13 -0
- package/language/characterClasses.mjs +12 -0
- package/language/lexer.js +21 -13
- package/language/lexer.mjs +22 -14
- package/language/parser.js +3 -2
- package/language/parser.mjs +3 -2
- package/language/printer.js +3 -1
- package/language/printer.mjs +3 -1
- package/language/visitor.js +2 -1
- package/language/visitor.mjs +2 -1
- package/package.json +4 -1
- package/type/directives.d.ts +1 -1
- package/type/directives.js +3 -3
- package/type/directives.mjs +3 -3
- package/type/index.d.ts +3 -0
- package/type/index.js +12 -0
- package/type/index.mjs +3 -0
- package/type/introspection.js +8 -4
- package/type/introspection.mjs +8 -4
- package/type/scalars.d.ts +10 -0
- package/type/scalars.js +18 -10
- package/type/scalars.mjs +16 -11
- package/type/schema.d.ts +1 -1
- package/type/schema.js +5 -3
- package/type/schema.mjs +4 -3
- package/type/validate.js +35 -26
- package/type/validate.mjs +35 -26
- package/utilities/TypeInfo.js +4 -0
- package/utilities/TypeInfo.mjs +4 -0
- package/utilities/assertValidName.js +3 -2
- package/utilities/assertValidName.mjs +3 -2
- package/utilities/astFromValue.js +4 -2
- package/utilities/astFromValue.mjs +4 -2
- package/utilities/buildClientSchema.js +2 -0
- package/utilities/buildClientSchema.mjs +2 -0
- package/utilities/coerceInputValue.js +4 -2
- package/utilities/coerceInputValue.mjs +4 -2
- package/utilities/extendSchema.js +40 -32
- package/utilities/extendSchema.mjs +40 -29
- package/utilities/findBreakingChanges.js +4 -2
- package/utilities/findBreakingChanges.mjs +4 -2
- package/utilities/lexicographicSortSchema.js +6 -5
- package/utilities/lexicographicSortSchema.mjs +6 -5
- package/utilities/printSchema.js +9 -7
- package/utilities/printSchema.mjs +10 -5
- package/utilities/separateOperations.js +2 -0
- package/utilities/separateOperations.mjs +2 -0
- package/utilities/stripIgnoredCharacters.js +3 -19
- package/utilities/stripIgnoredCharacters.mjs +4 -23
- package/utilities/typeFromAST.js +13 -24
- package/utilities/typeFromAST.mjs +12 -17
- package/utilities/valueFromAST.js +4 -2
- package/utilities/valueFromAST.mjs +4 -2
- package/utilities/valueFromASTUntyped.js +1 -11
- package/utilities/valueFromASTUntyped.mjs +1 -5
- package/validation/rules/KnownArgumentNamesRule.js +3 -1
- package/validation/rules/KnownArgumentNamesRule.mjs +3 -1
- package/validation/rules/KnownDirectivesRule.js +11 -7
- package/validation/rules/KnownDirectivesRule.mjs +7 -3
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js +4 -3
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +4 -3
- package/validation/rules/PossibleTypeExtensionsRule.js +14 -8
- package/validation/rules/PossibleTypeExtensionsRule.mjs +10 -4
- package/validation/rules/ProvidedRequiredArgumentsRule.js +8 -3
- package/validation/rules/ProvidedRequiredArgumentsRule.mjs +8 -3
- package/validation/rules/UniqueArgumentDefinitionNamesRule.js +9 -3
- package/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +9 -3
- package/validation/rules/UniqueArgumentNamesRule.js +3 -1
- package/validation/rules/UniqueArgumentNamesRule.mjs +3 -1
- package/validation/rules/UniqueEnumValueNamesRule.js +3 -1
- package/validation/rules/UniqueEnumValueNamesRule.mjs +3 -1
- package/validation/rules/UniqueFieldDefinitionNamesRule.js +3 -1
- package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +3 -1
- package/validation/rules/UniqueOperationTypesRule.js +3 -1
- package/validation/rules/UniqueOperationTypesRule.mjs +3 -1
- package/validation/rules/UniqueVariableNamesRule.js +3 -1
- package/validation/rules/UniqueVariableNamesRule.mjs +3 -1
- package/version.js +3 -3
- package/version.mjs +3 -3
|
@@ -20,7 +20,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
20
20
|
DirectiveDefinition(directiveNode) {
|
|
21
21
|
var _directiveNode$argume;
|
|
22
22
|
|
|
23
|
-
//
|
|
23
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
24
|
+
|
|
25
|
+
/* c8 ignore next */
|
|
24
26
|
const argumentNodes =
|
|
25
27
|
(_directiveNode$argume = directiveNode.arguments) !== null &&
|
|
26
28
|
_directiveNode$argume !== void 0
|
|
@@ -38,7 +40,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
38
40
|
function checkArgUniquenessPerField(typeNode) {
|
|
39
41
|
var _typeNode$fields;
|
|
40
42
|
|
|
41
|
-
const typeName = typeNode.name.value; //
|
|
43
|
+
const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
44
|
+
|
|
45
|
+
/* c8 ignore next */
|
|
42
46
|
|
|
43
47
|
const fieldNodes =
|
|
44
48
|
(_typeNode$fields = typeNode.fields) !== null &&
|
|
@@ -49,7 +53,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
49
53
|
for (const fieldDef of fieldNodes) {
|
|
50
54
|
var _fieldDef$arguments;
|
|
51
55
|
|
|
52
|
-
const fieldName = fieldDef.name.value; //
|
|
56
|
+
const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
57
|
+
|
|
58
|
+
/* c8 ignore next */
|
|
53
59
|
|
|
54
60
|
const argumentNodes =
|
|
55
61
|
(_fieldDef$arguments = fieldDef.arguments) !== null &&
|
|
@@ -12,7 +12,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
12
12
|
DirectiveDefinition(directiveNode) {
|
|
13
13
|
var _directiveNode$argume;
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
16
|
+
|
|
17
|
+
/* c8 ignore next */
|
|
16
18
|
const argumentNodes =
|
|
17
19
|
(_directiveNode$argume = directiveNode.arguments) !== null &&
|
|
18
20
|
_directiveNode$argume !== void 0
|
|
@@ -30,7 +32,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
30
32
|
function checkArgUniquenessPerField(typeNode) {
|
|
31
33
|
var _typeNode$fields;
|
|
32
34
|
|
|
33
|
-
const typeName = typeNode.name.value; //
|
|
35
|
+
const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
36
|
+
|
|
37
|
+
/* c8 ignore next */
|
|
34
38
|
|
|
35
39
|
const fieldNodes =
|
|
36
40
|
(_typeNode$fields = typeNode.fields) !== null &&
|
|
@@ -41,7 +45,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
|
|
|
41
45
|
for (const fieldDef of fieldNodes) {
|
|
42
46
|
var _fieldDef$arguments;
|
|
43
47
|
|
|
44
|
-
const fieldName = fieldDef.name.value; //
|
|
48
|
+
const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
49
|
+
|
|
50
|
+
/* c8 ignore next */
|
|
45
51
|
|
|
46
52
|
const argumentNodes =
|
|
47
53
|
(_fieldDef$arguments = fieldDef.arguments) !== null &&
|
|
@@ -26,7 +26,9 @@ function UniqueArgumentNamesRule(context) {
|
|
|
26
26
|
function checkArgUniqueness(parentNode) {
|
|
27
27
|
var _parentNode$arguments;
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
30
|
+
|
|
31
|
+
/* c8 ignore next */
|
|
30
32
|
const argumentNodes =
|
|
31
33
|
(_parentNode$arguments = parentNode.arguments) !== null &&
|
|
32
34
|
_parentNode$arguments !== void 0
|
|
@@ -18,7 +18,9 @@ export function UniqueArgumentNamesRule(context) {
|
|
|
18
18
|
function checkArgUniqueness(parentNode) {
|
|
19
19
|
var _parentNode$arguments;
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
22
|
+
|
|
23
|
+
/* c8 ignore next */
|
|
22
24
|
const argumentNodes =
|
|
23
25
|
(_parentNode$arguments = parentNode.arguments) !== null &&
|
|
24
26
|
_parentNode$arguments !== void 0
|
|
@@ -30,7 +30,9 @@ function UniqueEnumValueNamesRule(context) {
|
|
|
30
30
|
|
|
31
31
|
if (!knownValueNames[typeName]) {
|
|
32
32
|
knownValueNames[typeName] = Object.create(null);
|
|
33
|
-
} //
|
|
33
|
+
} // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
34
|
+
|
|
35
|
+
/* c8 ignore next */
|
|
34
36
|
|
|
35
37
|
const valueNodes =
|
|
36
38
|
(_node$values = node.values) !== null && _node$values !== void 0
|
|
@@ -22,7 +22,9 @@ export function UniqueEnumValueNamesRule(context) {
|
|
|
22
22
|
|
|
23
23
|
if (!knownValueNames[typeName]) {
|
|
24
24
|
knownValueNames[typeName] = Object.create(null);
|
|
25
|
-
} //
|
|
25
|
+
} // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
26
|
+
|
|
27
|
+
/* c8 ignore next */
|
|
26
28
|
|
|
27
29
|
const valueNodes =
|
|
28
30
|
(_node$values = node.values) !== null && _node$values !== void 0
|
|
@@ -34,7 +34,9 @@ function UniqueFieldDefinitionNamesRule(context) {
|
|
|
34
34
|
|
|
35
35
|
if (!knownFieldNames[typeName]) {
|
|
36
36
|
knownFieldNames[typeName] = Object.create(null);
|
|
37
|
-
} //
|
|
37
|
+
} // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
38
|
+
|
|
39
|
+
/* c8 ignore next */
|
|
38
40
|
|
|
39
41
|
const fieldNodes =
|
|
40
42
|
(_node$fields = node.fields) !== null && _node$fields !== void 0
|
|
@@ -30,7 +30,9 @@ export function UniqueFieldDefinitionNamesRule(context) {
|
|
|
30
30
|
|
|
31
31
|
if (!knownFieldNames[typeName]) {
|
|
32
32
|
knownFieldNames[typeName] = Object.create(null);
|
|
33
|
-
} //
|
|
33
|
+
} // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
34
|
+
|
|
35
|
+
/* c8 ignore next */
|
|
34
36
|
|
|
35
37
|
const fieldNodes =
|
|
36
38
|
(_node$fields = node.fields) !== null && _node$fields !== void 0
|
|
@@ -30,7 +30,9 @@ function UniqueOperationTypesRule(context) {
|
|
|
30
30
|
function checkOperationTypes(node) {
|
|
31
31
|
var _node$operationTypes;
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// See: https://github.com/graphql/graphql-js/issues/2203
|
|
34
|
+
|
|
35
|
+
/* c8 ignore next */
|
|
34
36
|
const operationTypesNodes =
|
|
35
37
|
(_node$operationTypes = node.operationTypes) !== null &&
|
|
36
38
|
_node$operationTypes !== void 0
|
|
@@ -23,7 +23,9 @@ export function UniqueOperationTypesRule(context) {
|
|
|
23
23
|
function checkOperationTypes(node) {
|
|
24
24
|
var _node$operationTypes;
|
|
25
25
|
|
|
26
|
-
//
|
|
26
|
+
// See: https://github.com/graphql/graphql-js/issues/2203
|
|
27
|
+
|
|
28
|
+
/* c8 ignore next */
|
|
27
29
|
const operationTypesNodes =
|
|
28
30
|
(_node$operationTypes = node.operationTypes) !== null &&
|
|
29
31
|
_node$operationTypes !== void 0
|
|
@@ -19,7 +19,9 @@ function UniqueVariableNamesRule(context) {
|
|
|
19
19
|
OperationDefinition(operationNode) {
|
|
20
20
|
var _operationNode$variab;
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// See: https://github.com/graphql/graphql-js/issues/2203
|
|
23
|
+
|
|
24
|
+
/* c8 ignore next */
|
|
23
25
|
const variableDefinitions =
|
|
24
26
|
(_operationNode$variab = operationNode.variableDefinitions) !== null &&
|
|
25
27
|
_operationNode$variab !== void 0
|
|
@@ -11,7 +11,9 @@ export function UniqueVariableNamesRule(context) {
|
|
|
11
11
|
OperationDefinition(operationNode) {
|
|
12
12
|
var _operationNode$variab;
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// See: https://github.com/graphql/graphql-js/issues/2203
|
|
15
|
+
|
|
16
|
+
/* c8 ignore next */
|
|
15
17
|
const variableDefinitions =
|
|
16
18
|
(_operationNode$variab = operationNode.variableDefinitions) !== null &&
|
|
17
19
|
_operationNode$variab !== void 0
|
package/version.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
10
10
|
/**
|
|
11
11
|
* A string containing the version of the GraphQL.js library
|
|
12
12
|
*/
|
|
13
|
-
const version = '16.0
|
|
13
|
+
const version = '16.1.0';
|
|
14
14
|
/**
|
|
15
15
|
* An object containing the components of the GraphQL.js version string
|
|
16
16
|
*/
|
|
@@ -18,8 +18,8 @@ const version = '16.0.1';
|
|
|
18
18
|
exports.version = version;
|
|
19
19
|
const versionInfo = Object.freeze({
|
|
20
20
|
major: 16,
|
|
21
|
-
minor:
|
|
22
|
-
patch:
|
|
21
|
+
minor: 1,
|
|
22
|
+
patch: 0,
|
|
23
23
|
preReleaseTag: null,
|
|
24
24
|
});
|
|
25
25
|
exports.versionInfo = versionInfo;
|
package/version.mjs
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* A string containing the version of the GraphQL.js library
|
|
6
6
|
*/
|
|
7
|
-
export const version = '16.0
|
|
7
|
+
export const version = '16.1.0';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing the components of the GraphQL.js version string
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export const versionInfo = Object.freeze({
|
|
13
13
|
major: 16,
|
|
14
|
-
minor:
|
|
15
|
-
patch:
|
|
14
|
+
minor: 1,
|
|
15
|
+
patch: 0,
|
|
16
16
|
preReleaseTag: null,
|
|
17
17
|
});
|