Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/mock

Package Overview
Dependencies
Maintainers
3
Versions
1141
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 8.7.20 to 9.0.0

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": "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",

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