You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@apollo/client

Package Overview
Dependencies
Maintainers
1
Versions
559
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.35 to 3.0.0-beta.36

cache/core/types/common.d.ts

4

cache/core/cache.d.ts
import { DocumentNode } from 'graphql';
import { StoreObject } from '../../utilities/graphql/storeUtils';
import { DataProxy } from './types/DataProxy';
import { Cache } from './types/Cache';
import { Modifier, Modifiers } from './types/common';
export declare type Transaction<T> = (c: ApolloCache<T>) => void;

@@ -18,2 +20,4 @@ export declare abstract class ApolloCache<TSerialized> implements DataProxy {

transformDocument(document: DocumentNode): DocumentNode;
identify(object: StoreObject): string | null;
modify(dataId: string, modifiers: Modifier<any> | Modifiers, optimistic?: boolean): boolean;
transformForLink(document: DocumentNode): DocumentNode;

@@ -20,0 +24,0 @@ readQuery<QueryType, TVariables = any>(options: DataProxy.Query<TVariables>, optimistic?: boolean): QueryType | null;

@@ -29,2 +29,8 @@ import { getFragmentQueryDocument } from '../../utilities/graphql/fragments.js';

};
ApolloCache.prototype.identify = function (object) {
return null;
};
ApolloCache.prototype.modify = function (dataId, modifiers, optimistic) {
return false;
};
ApolloCache.prototype.transformForLink = function (document) {

@@ -31,0 +37,0 @@ return document;

17

cache/inmemory/entityStore.d.ts
import { KeyTrie } from 'optimism';
import { isReference, StoreValue, Reference } from '../../utilities/graphql/storeUtils';
import { NormalizedCache, NormalizedCacheObject, StoreObject, SafeReadonly } from './types';
import { StoreValue, StoreObject, Reference } from '../../utilities/graphql/storeUtils';
import { NormalizedCache, NormalizedCacheObject } from './types';
import { Policies } from './policies';
export declare type Modifier<T> = (value: T, details: {
DELETE: typeof DELETE;
fieldName: string;
storeFieldName: string;
isReference: typeof isReference;
toReference: Policies["toReference"];
readField<V = StoreValue>(fieldName: string, objOrRef?: StoreObject | Reference): SafeReadonly<V>;
}) => T;
export declare type Modifiers = {
[fieldName: string]: Modifier<any>;
};
declare const DELETE: any;
import { Modifier, Modifiers, SafeReadonly } from '../core/types/common';
export declare abstract class EntityStore implements NormalizedCache {

@@ -18,0 +7,0 @@ readonly policies: Policies;

@@ -249,3 +249,3 @@ import { __assign, __extends } from 'tslib';

function makeDepKey(dataId, storeFieldName) {
return fieldNameFromStoreName(storeFieldName) + "#" + dataId;
return fieldNameFromStoreName(storeFieldName) + '#' + dataId;
}

@@ -252,0 +252,0 @@ (function (EntityStore) {

@@ -1,2 +0,1 @@

export {};
//# sourceMappingURL=fixPolyfills.d.ts.map

@@ -1,47 +0,1 @@

var testMap = new Map();
if (testMap.set(1, 2) !== testMap) {
var set_1 = testMap.set;
Map.prototype.set = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
set_1.apply(this, args);
return this;
};
}
var testSet = new Set();
if (testSet.add(3) !== testSet) {
var add_1 = testSet.add;
Set.prototype.add = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
add_1.apply(this, args);
return this;
};
}
var frozen = {};
if (typeof Object.freeze === 'function') {
Object.freeze(frozen);
}
try {
testMap.set(frozen, frozen).delete(frozen);
}
catch (_a) {
var wrap = function (method) {
return method && (function (obj) {
try {
testMap.set(obj, obj).delete(obj);
}
finally {
return method.call(Object, obj);
}
});
};
Object.freeze = wrap(Object.freeze);
Object.seal = wrap(Object.seal);
Object.preventExtensions = wrap(Object.preventExtensions);
}
//# sourceMappingURL=fixPolyfills.js.map
//# sourceMappingURL=fixPolyfills.js.map
import { FieldNode } from 'graphql';
import { NormalizedCache, StoreObject } from './types';
import { Reference, StoreValue } from '../../utilities/graphql/storeUtils';
import { NormalizedCache } from './types';
import { Reference, StoreValue, StoreObject } from '../../utilities/graphql/storeUtils';
import { DeepMerger } from '../../utilities/common/mergeDeep';

@@ -5,0 +5,0 @@ export declare function getTypenameFromStoreObject(store: NormalizedCache, objectOrReference: StoreObject | Reference): string | undefined;

@@ -5,4 +5,5 @@ import './fixPolyfills';

import { Cache } from '../core/types/Cache';
import { ApolloReducerConfig, NormalizedCacheObject, StoreObject } from './types';
import { Modifiers, Modifier } from './entityStore';
import { Modifier, Modifiers } from '../core/types/common';
import { StoreObject } from '../../utilities/graphql/storeUtils';
import { ApolloReducerConfig, NormalizedCacheObject } from './types';
import { PossibleTypesMap, Policies, TypePolicies } from './policies';

@@ -9,0 +10,0 @@ export interface InMemoryCacheConfig extends ApolloReducerConfig {

@@ -5,3 +5,2 @@ import { __extends, __assign } from 'tslib';

import { ApolloCache } from '../core/cache.js';
import './fixPolyfills.js';
import { Policies, defaultDataIdFromObject } from './policies.js';

@@ -8,0 +7,0 @@ import { EntityStore, supportsResultCaching } from './entityStore.js';

import { InlineFragmentNode, FragmentDefinitionNode, SelectionSetNode, FieldNode } from "graphql";
import { FragmentMap } from '../../utilities/graphql/fragments';
import { StoreValue, Reference, isReference } from '../../utilities/graphql/storeUtils';
import { IdGetter, StoreObject, SafeReadonly } from "./types";
import { StoreValue, StoreObject, Reference, isReference } from '../../utilities/graphql/storeUtils';
import { IdGetter } from "./types";
import { FieldValueToBeMerged } from './helpers';
import { FieldValueGetter } from './entityStore';
import { SafeReadonly } from '../core/types/common';
export declare type TypePolicies = {

@@ -8,0 +9,0 @@ [__typename: string]: TypePolicy;

import { DocumentNode } from 'graphql';
import { Transaction } from '../core/cache';
import { StoreValue } from '../../utilities/graphql/storeUtils';
import { Modifiers, Modifier, FieldValueGetter } from './entityStore';
import { Modifier, Modifiers } from '../core/types/common';
import { StoreValue, StoreObject } from '../../utilities/graphql/storeUtils';
import { FieldValueGetter } from './entityStore';
export { StoreValue };

@@ -28,7 +29,2 @@ export interface IdGetterObj extends Object {

}
export interface StoreObject {
__typename?: string;
[storeFieldName: string]: StoreValue;
}
export declare type SafeReadonly<T> = T extends object ? Readonly<T> : T;
export declare type OptimisticStoreItem = {

@@ -35,0 +31,0 @@ id: string;

import { DocumentNode, ExecutionResult } from 'graphql';
import { ApolloCache } from '../cache/core/cache';
import { FetchResult } from '../link/core/types';
import { DataProxy } from '../cache/core/types/DataProxy';
import { MutationQueryReducersMap } from './types';

@@ -72,3 +72,3 @@ import { PureQueryOptions, OperationVariables } from './types';

[key: string]: any;
}> = (proxy: DataProxy, mutationResult: FetchResult<T>) => void;
}> = (cache: ApolloCache<T>, mutationResult: FetchResult<T>) => void;
//# sourceMappingURL=watchQueryOptions.d.ts.map
{
"name": "@apollo/client",
"version": "3.0.0-beta.35",
"version": "3.0.0-beta.36",
"description": "A fully-featured caching GraphQL client.",

@@ -20,4 +20,7 @@ "private": false,

"sideEffects": [
"./cache/inmemory/fixPolyfills.js"
"./cache/inmemory/fixPolyfills.native.js"
],
"react-native": {
"./dist/cache/inmemory/fixPolyfills.js": "./cache/inmemory/fixPolyfills.native.js"
},
"repository": {

@@ -24,0 +27,0 @@ "type": "git",

@@ -9,2 +9,6 @@ import { DirectiveNode, FieldNode, VariableNode, InlineFragmentNode, ValueNode, SelectionNode, NameNode, SelectionSetNode } from 'graphql';

export declare type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
export interface StoreObject {
__typename?: string;
[storeFieldName: string]: StoreValue;
}
export declare function valueToObjectRepresentation(argObj: any, name: NameNode, value: ValueNode, variables?: Object): void;

@@ -11,0 +15,0 @@ export declare function storeKeyNameFromField(field: FieldNode, variables?: Object): string;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc