@graphql-tools/mock
Advanced tools
Comparing version 9.0.0-rc-20230519104353-b09f3180 to 9.0.0-rc-20230519104627-f6fea064
@@ -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": "9.0.0-rc-20230519104353-b09f3180", | ||
"version": "9.0.0-rc-20230519104627-f6fea064", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,4 +10,4 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/schema": "10.0.0-rc-20230519104353-b09f3180", | ||
"@graphql-tools/utils": "10.0.0-rc-20230519104353-b09f3180", | ||
"@graphql-tools/schema": "10.0.0-rc-20230519104627-f6fea064", | ||
"@graphql-tools/utils": "10.0.0-rc-20230519104627-f6fea064", | ||
"fast-json-stable-stringify": "^2.1.0", | ||
@@ -14,0 +14,0 @@ "tslib": "^2.4.0" |
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
110824
2403
+ Added@graphql-tools/merge@9.0.0-rc-20230519104627-f6fea064(transitive)
+ Added@graphql-tools/schema@10.0.0-rc-20230519104627-f6fea064(transitive)
+ Added@graphql-tools/utils@10.0.0-rc-20230519104627-f6fea064(transitive)
+ Added@graphql-typed-document-node/core@3.2.0(transitive)
+ Addedvalue-or-promise@1.0.12(transitive)
Updated@graphql-tools/schema@10.0.0-rc-20230519104627-f6fea064
Updated@graphql-tools/utils@10.0.0-rc-20230519104627-f6fea064