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

@shopify/graphql-testing

Package Overview
Dependencies
Maintainers
13
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 4.1.2 to 4.2.0

6

CHANGELOG.md

@@ -10,2 +10,8 @@ # Changelog

## [4.2.0] - 2020-06-24
### Changed
- Add subsequential request mocking support ([#1534](https://github.com/Shopify/quilt/pull/1534))
## [4.1.0] - 2020-04-20

@@ -12,0 +18,0 @@

2

dist/src/graphql-controller.d.ts

@@ -17,3 +17,5 @@ import { ApolloReducerConfig } from 'apollo-cache-inmemory';

private readonly wrappers;
private readonly mockLink;
constructor(mock: GraphQLMock | undefined, { unionOrIntersectionTypes, cacheOptions }?: Options);
update(mock: GraphQLMock): void;
resolveAll(options?: FindOptions): Promise<void>;

@@ -20,0 +22,0 @@ wrap(wrapper: Wrapper): void;

@@ -17,2 +17,3 @@ "use strict";

this.wrappers = [];
this.mockLink = null;
this.handleCreate = function (request) {

@@ -32,2 +33,3 @@ _this.pendingRequests.add(request);

}) }, cacheOptions));
this.mockLink = new links_1.MockLink(mock || defaultGraphQLMock);
var link = apollo_link_1.ApolloLink.from([

@@ -38,3 +40,3 @@ new links_1.InflightLink({

}),
new links_1.MockLink(mock || defaultGraphQLMock),
this.mockLink,
]);

@@ -46,2 +48,8 @@ this.client = new client_1.TestingApolloClient({

}
GraphQL.prototype.update = function (mock) {
if (!this.mockLink) {
return;
}
this.mockLink.updateMock(mock);
};
GraphQL.prototype.resolveAll = function (options) {

@@ -48,0 +56,0 @@ if (options === void 0) { options = {}; }

@@ -6,4 +6,5 @@ import { ApolloLink, Observable, Operation } from 'apollo-link';

constructor(mock: GraphQLMock);
updateMock(mock: GraphQLMock): void;
request(operation: Operation): Observable<any>;
}
//# sourceMappingURL=mocks.d.ts.map

@@ -13,2 +13,5 @@ "use strict";

}
MockLink.prototype.updateMock = function (mock) {
this.mock = mock;
};
MockLink.prototype.request = function (operation) {

@@ -15,0 +18,0 @@ var _this = this;

2

package.json
{
"name": "@shopify/graphql-testing",
"version": "4.1.2",
"version": "4.2.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Utilities to create mock GraphQL factories",

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