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

@shopify/graphql-testing

Package Overview
Dependencies
Maintainers
19
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/graphql-testing - npm Package Compare versions

Comparing version 0.0.0-snapshot-20230126013201 to 0.0.0-snapshot-20230126034856

7

build/cjs/graphql-controller.js

@@ -7,3 +7,2 @@ 'use strict';

var apolloCacheInmemory = require('apollo-cache-inmemory');
var isEqual = require('fast-deep-equal');
var client = require('./client.js');

@@ -15,6 +14,2 @@ var operations = require('./operations.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
class GraphQL {

@@ -83,3 +78,3 @@ constructor(mock = {}, {

}
}) => operationName === finalOperationName && (!options.variables || isEqual__default["default"](variables, options.variables))) : allPendingRequests;
}) => operationName === finalOperationName && (!options.variables || utilities.variablesMatch(variables, options.variables))) : allPendingRequests;
await Promise.all(matchingRequests.map(({

@@ -86,0 +81,0 @@ resolve

5

build/cjs/utilities.js

@@ -41,4 +41,9 @@ 'use strict';

function variablesMatch(operationVariables, providedVariables) {
return !Object.entries(providedVariables).some(([key, val]) => operationVariables[key] !== val);
}
exports.operationNameFromDocument = operationNameFromDocument;
exports.operationNameFromFindOptions = operationNameFromFindOptions;
exports.operationTypeFromDocument = operationTypeFromDocument;
exports.variablesMatch = variablesMatch;

@@ -11,3 +11,3 @@ import { DocumentNode } from 'graphql';

variables?: {
[key: string]: any;
[key: string]: string | number;
};

@@ -14,0 +14,0 @@ /**

@@ -14,2 +14,3 @@ import { DocumentNode } from 'graphql';

}): import("graphql").OperationTypeNode;
export declare function variablesMatch(operationVariables: Record<string, any>, providedVariables: NonNullable<FindOptions['variables']>): boolean;
//# sourceMappingURL=utilities.d.ts.map
{
"name": "@shopify/graphql-testing",
"version": "0.0.0-snapshot-20230126013201",
"version": "0.0.0-snapshot-20230126034856",
"license": "MIT",

@@ -37,3 +37,2 @@ "description": "Utilities to create mock GraphQL factories",

"apollo-link": ">=1.0.0 <2.0.0",
"fast-deep-equal": "^3.1.3",
"graphql": ">=14.5.0 <16.0.0",

@@ -40,0 +39,0 @@ "jest-matcher-utils": "^26.6.2"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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