Socket
Socket
Sign inDemoInstall

@graphql-tools/mock

Package Overview
Dependencies
Maintainers
3
Versions
1135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/mock - npm Package Compare versions

Comparing version 9.0.0-rc-20230519104353-b09f3180 to 9.0.0-rc-20230519104627-f6fea064

2

cjs/MockList.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc