New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphitation/apollo-mock-client

Package Overview
Dependencies
Maintainers
5
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphitation/apollo-mock-client - npm Package Compare versions

Comparing version 0.10.6 to 0.10.7

13

CHANGELOG.md
# Change Log - @graphitation/apollo-mock-client
This log was last generated on Thu, 19 May 2022 14:31:52 GMT and should not be manually modified.
This log was last generated on Fri, 03 Jun 2022 14:02:25 GMT and should not be manually modified.
<!-- Start content -->
## 0.10.7
Fri, 03 Jun 2022 14:02:25 GMT
### Patches
- Allow cache config for mock client (eloy.de.enige@gmail.com)
- Bump @graphitation/graphql-js-operation-payload-generator to v0.9.1
## 0.10.6
Thu, 19 May 2022 14:31:52 GMT
Thu, 19 May 2022 14:31:59 GMT

@@ -11,0 +20,0 @@ ### Patches

9

lib/index.d.ts

@@ -1,3 +0,4 @@

import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
import { DocumentNode, ExecutionResult, GraphQLSchema } from "graphql";
import { ApolloClient } from "@apollo/client";
import type { NormalizedCacheObject, InMemoryCacheConfig } from "@apollo/client";
import type { DocumentNode, ExecutionResult, GraphQLSchema } from "graphql";
export interface RequestDescriptor<Node = DocumentNode> {

@@ -90,4 +91,6 @@ readonly node: Node;

}
export declare function createMockClient(schema: GraphQLSchema): ApolloMockClient;
export declare function createMockClient(schema: GraphQLSchema, options?: {
cache?: InMemoryCacheConfig;
}): ApolloMockClient;
export {};
//# sourceMappingURL=index.d.ts.map

@@ -7,2 +7,16 @@ var __create = Object.create;

var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
var __objSpread = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});

@@ -49,4 +63,4 @@ var __export = (target, all) => {

var import_client = __toModule(require("@apollo/client"));
var import_graphql = __toModule(require("graphql"));
var import_invariant = __toModule(require("invariant"));
var import_graphql = __toModule(require("graphql"));
class MockLink extends import_client.ApolloLink {

@@ -167,3 +181,3 @@ constructor(schema) {

}
function createMockClient(schema) {
function createMockClient(schema, options) {
const possibleTypes = {};

@@ -179,6 +193,6 @@ Object.keys(schema.getTypeMap()).forEach((typeName) => {

return Object.assign(new import_client.ApolloClient({
cache: new import_client.InMemoryCache({
cache: new import_client.InMemoryCache(__objSpread(__objSpread({}, options == null ? void 0 : options.cache), {
possibleTypes,
addTypename: true
}),
})),
link

@@ -185,0 +199,0 @@ }), {

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.10.6",
"version": "0.10.7",
"repository": {

@@ -23,3 +23,3 @@ "type": "git",

"@graphitation/graphql-js-tag": "^0.9.0",
"@graphitation/graphql-js-operation-payload-generator": "^0.9.0",
"@graphitation/graphql-js-operation-payload-generator": "^0.9.1",
"@types/invariant": "^2.2.34",

@@ -26,0 +26,0 @@ "@types/jest": "^26.0.22",

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