apollo-cache
Advanced tools
Comparing version 1.0.1 to 1.0.2
### vNext | ||
### 1.0.2 | ||
- package depenedency updates | ||
### 1.0.1 | ||
@@ -4,0 +8,0 @@ - improved rollup builds |
@@ -5,3 +5,3 @@ import { DocumentNode } from 'graphql'; | ||
export declare abstract class ApolloCache<TSerialized> implements DataProxy { | ||
abstract read<T>(query: Cache.ReadOptions): T; | ||
abstract read<T>(query: Cache.ReadOptions): T | null; | ||
abstract write(write: Cache.WriteOptions): void; | ||
@@ -19,3 +19,3 @@ abstract diff<T>(query: Cache.DiffOptions): Cache.DiffResult<T>; | ||
transformForLink(document: DocumentNode): DocumentNode; | ||
readQuery<QueryType>(options: DataProxy.Query, optimistic?: boolean): QueryType; | ||
readQuery<QueryType>(options: DataProxy.Query, optimistic?: boolean): QueryType | null; | ||
readFragment<FragmentType>(options: DataProxy.Fragment, optimistic?: boolean): FragmentType | null; | ||
@@ -22,0 +22,0 @@ writeQuery(options: Cache.WriteQueryOptions): void; |
@@ -1,2 +0,2 @@ | ||
import { DocumentNode } from 'graphql'; | ||
import { DocumentNode } from "graphql"; | ||
export declare namespace DataProxy { | ||
@@ -25,3 +25,3 @@ interface Query { | ||
export interface DataProxy { | ||
readQuery<QueryType>(options: DataProxy.Query, optimistic?: boolean): QueryType; | ||
readQuery<QueryType>(options: DataProxy.Query, optimistic?: boolean): QueryType | null; | ||
readFragment<FragmentType>(options: DataProxy.Fragment, optimistic?: boolean): FragmentType | null; | ||
@@ -28,0 +28,0 @@ writeQuery(options: DataProxy.WriteQueryOptions): void; |
{ | ||
"name": "apollo-cache", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Core abstract of Caching layer for Apollo Client", | ||
@@ -43,7 +43,7 @@ "author": "James Baxley <james@meteor.com>", | ||
"dependencies": { | ||
"apollo-utilities": "^1.0.2" | ||
"apollo-utilities": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/graphql": "0.9.4", | ||
"@types/jest": "21.1.6", | ||
"@types/graphql": "0.11.7", | ||
"@types/jest": "21.1.8", | ||
"browserify": "14.5.0", | ||
@@ -54,4 +54,4 @@ "graphql": "0.11.7", | ||
"rimraf": "2.6.2", | ||
"rollup": "0.50.0", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup": "0.52.0", | ||
"rollup-plugin-node-resolve": "3.0.0", | ||
"ts-jest": "20.0.14", | ||
@@ -58,0 +58,0 @@ "tslint": "5.8.0", |
@@ -11,3 +11,3 @@ import { DocumentNode } from 'graphql'; | ||
// core API | ||
public abstract read<T>(query: Cache.ReadOptions): T; | ||
public abstract read<T>(query: Cache.ReadOptions): T | null; | ||
public abstract write(write: Cache.WriteOptions): void; | ||
@@ -66,3 +66,3 @@ public abstract diff<T>(query: Cache.DiffOptions): Cache.DiffResult<T>; | ||
optimistic: boolean = false, | ||
): QueryType { | ||
): QueryType | null { | ||
return this.read({ | ||
@@ -69,0 +69,0 @@ query: options.query, |
@@ -1,2 +0,2 @@ | ||
import { DocumentNode } from 'graphql'; // eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved | ||
import { DocumentNode } from "graphql"; // eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved | ||
@@ -79,4 +79,4 @@ export namespace DataProxy { | ||
options: DataProxy.Query, | ||
optimistic?: boolean, | ||
): QueryType; | ||
optimistic?: boolean | ||
): QueryType | null; | ||
@@ -90,3 +90,3 @@ /** | ||
options: DataProxy.Fragment, | ||
optimistic?: boolean, | ||
optimistic?: boolean | ||
): FragmentType | null; | ||
@@ -93,0 +93,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24404
Updatedapollo-utilities@^1.0.3