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 5.1.9 to 6.0.0

40

build/cjs/graphql-controller.js

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

var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
var apolloLink = require('apollo-link');

@@ -35,3 +34,3 @@ var apolloCacheInmemory = require('apollo-cache-inmemory');

const cache = new apolloCacheInmemory.InMemoryCache(_rollupPluginBabelHelpers.objectSpread2({
const cache = new apolloCacheInmemory.InMemoryCache({
fragmentMatcher: new apolloCacheInmemory.IntrospectionFragmentMatcher({

@@ -43,4 +42,5 @@ introspectionQueryResultData: {

}
})
}, cacheOptions));
}),
...cacheOptions
});
this.mockLink = new mocks.MockLink(mock || defaultGraphQLMock);

@@ -65,20 +65,16 @@ const link = apolloLink.ApolloLink.from([new inflight.InflightLink({

resolveAll(options = {}) {
var _this = this;
return _rollupPluginBabelHelpers.asyncToGenerator(function* () {
const finalOperationName = utilities.operationNameFromFindOptions(options);
yield _this.wrappers.reduce((perform, wrapper) => {
return () => wrapper(perform);
}, /*#__PURE__*/_rollupPluginBabelHelpers.asyncToGenerator(function* () {
const allPendingRequests = Array.from(_this.pendingRequests);
const matchingRequests = finalOperationName ? allPendingRequests.filter(({
operation: {
operationName
}
}) => operationName === finalOperationName) : allPendingRequests;
yield Promise.all(matchingRequests.map(({
resolve
}) => resolve()));
}))();
async resolveAll(options = {}) {
const finalOperationName = utilities.operationNameFromFindOptions(options);
await this.wrappers.reduce((perform, wrapper) => {
return () => wrapper(perform);
}, async () => {
const allPendingRequests = Array.from(this.pendingRequests);
const matchingRequests = finalOperationName ? allPendingRequests.filter(({
operation: {
operationName
}
}) => operationName === finalOperationName) : allPendingRequests;
await Promise.all(matchingRequests.map(({
resolve
}) => resolve()));
})();

@@ -85,0 +81,0 @@ }

{
"name": "@shopify/graphql-testing",
"version": "5.1.9",
"version": "6.0.0",
"license": "MIT",

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

"engines": {
"node": ">=12.14.0"
"node": "^14.17.0 || >=16.0.0"
},

@@ -42,3 +42,3 @@ "dependencies": {

"devDependencies": {
"graphql-typed": "^1.1.5"
"graphql-typed": "^2.0.0"
},

@@ -68,6 +68,5 @@ "files": [

"require": "./index.js"
},
"./*": "./*"
}
},
"gitHead": "70feded397084daea784a8c5a523a61ac4fdb34c"
"gitHead": "ef9afc562672dcda9d7800753dc6b777ecd2d751"
}

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