@graphql-tools/mock
Advanced tools
Comparing version 8.7.20 to 9.0.0
@@ -8,3 +8,3 @@ "use strict"; | ||
function isMockList(obj) { | ||
if (typeof (obj === null || obj === void 0 ? void 0 : obj.len) === 'number' || (Array.isArray(obj === null || obj === void 0 ? void 0 : obj.len) && typeof (obj === null || obj === void 0 ? void 0 : obj.len[0]) === 'number')) { | ||
if (typeof obj?.len === 'number' || (Array.isArray(obj?.len) && typeof obj?.len[0] === 'number')) { | ||
if (typeof obj.wrappedFunction === 'undefined' || typeof obj.wrappedFunction === 'function') { | ||
@@ -11,0 +11,0 @@ return true; |
@@ -425,4 +425,3 @@ "use strict"; | ||
getKeyFieldName(typeName) { | ||
var _a; | ||
const typePolicyKeyField = (_a = this.typePolicies[typeName]) === null || _a === void 0 ? void 0 : _a.keyFieldName; | ||
const typePolicyKeyField = this.typePolicies[typeName]?.keyFieldName; | ||
if (typePolicyKeyField !== undefined) { | ||
@@ -429,0 +428,0 @@ if (typePolicyKeyField === false) |
@@ -23,3 +23,3 @@ "use strict"; | ||
const source = (0, utils_js_1.isRootType)(info.parentType, info.schema) ? (0, utils_js_1.makeRef)(info.parentType.name, 'ROOT') : parent; | ||
const allNodesFn_ = allNodesFn !== null && allNodesFn !== void 0 ? allNodesFn : defaultAllNodesFn(store); | ||
const allNodesFn_ = allNodesFn ?? defaultAllNodesFn(store); | ||
let allNodes = allNodesFn_(source, args, context, info); | ||
@@ -26,0 +26,0 @@ if (applyOnNodes) { |
@@ -5,3 +5,3 @@ /** | ||
export function isMockList(obj) { | ||
if (typeof (obj === null || obj === void 0 ? void 0 : obj.len) === 'number' || (Array.isArray(obj === null || obj === void 0 ? void 0 : obj.len) && typeof (obj === null || obj === void 0 ? void 0 : obj.len[0]) === 'number')) { | ||
if (typeof obj?.len === 'number' || (Array.isArray(obj?.len) && typeof obj?.len[0] === 'number')) { | ||
if (typeof obj.wrappedFunction === 'undefined' || typeof obj.wrappedFunction === 'function') { | ||
@@ -8,0 +8,0 @@ return true; |
@@ -421,4 +421,3 @@ import { GraphQLString, isObjectType, isScalarType, getNullableType, isListType, isEnumType, isAbstractType, isCompositeType, isNullableType, isInterfaceType, } from 'graphql'; | ||
getKeyFieldName(typeName) { | ||
var _a; | ||
const typePolicyKeyField = (_a = this.typePolicies[typeName]) === null || _a === void 0 ? void 0 : _a.keyFieldName; | ||
const typePolicyKeyField = this.typePolicies[typeName]?.keyFieldName; | ||
if (typePolicyKeyField !== undefined) { | ||
@@ -425,0 +424,0 @@ if (typePolicyKeyField === false) |
@@ -20,3 +20,3 @@ import { isRootType, makeRef } from './utils.js'; | ||
const source = isRootType(info.parentType, info.schema) ? makeRef(info.parentType.name, 'ROOT') : parent; | ||
const allNodesFn_ = allNodesFn !== null && allNodesFn !== void 0 ? allNodesFn : defaultAllNodesFn(store); | ||
const allNodesFn_ = allNodesFn ?? defaultAllNodesFn(store); | ||
let allNodes = allNodesFn_(source, args, context, info); | ||
@@ -23,0 +23,0 @@ if (applyOnNodes) { |
{ | ||
"name": "@graphql-tools/mock", | ||
"version": "8.7.20", | ||
"version": "9.0.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,4 +10,4 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/schema": "^9.0.18", | ||
"@graphql-tools/utils": "^9.2.1", | ||
"@graphql-tools/schema": "^10.0.0", | ||
"@graphql-tools/utils": "^10.0.0", | ||
"fast-json-stable-stringify": "^2.1.0", | ||
@@ -22,2 +22,5 @@ "tslib": "^2.4.0" | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"main": "cjs/index.js", | ||
@@ -24,0 +27,0 @@ "module": "esm/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110745
2403
+ Added@graphql-tools/merge@9.0.8(transitive)
+ Added@graphql-tools/schema@10.0.7(transitive)
+ Added@graphql-tools/utils@10.5.5(transitive)
+ Addedcross-inspect@1.0.1(transitive)
+ Addeddset@3.1.4(transitive)
- Removed@graphql-tools/merge@8.4.2(transitive)
- Removed@graphql-tools/schema@9.0.19(transitive)
- Removed@graphql-tools/utils@9.2.1(transitive)
Updated@graphql-tools/utils@^10.0.0