apollo-link-batch-http
Advanced tools
Comparing version 1.0.2 to 1.0.3
### vNext | ||
### 1.0.3 | ||
- export options as named interface [TypeScript] | ||
### 1.0.2 | ||
@@ -5,0 +8,0 @@ - changed peer-dependency of apollo-link to actual dependency |
/// <reference types="zen-observable" /> | ||
import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link'; | ||
import { ApolloFetch } from 'apollo-fetch'; | ||
export declare namespace BatchHttpLink { | ||
interface Options { | ||
uri?: string; | ||
batchMax?: number; | ||
batchInterval?: number; | ||
fetch?: ApolloFetch; | ||
} | ||
} | ||
export declare class BatchHttpLink extends ApolloLink { | ||
@@ -10,9 +18,4 @@ private headers; | ||
private batcher; | ||
constructor(fetchParams?: { | ||
uri?: string; | ||
batchInterval?: number; | ||
batchMax?: number; | ||
fetch?: ApolloFetch; | ||
}); | ||
constructor(fetchParams?: BatchHttpLink.Options); | ||
request(operation: Operation): Observable<FetchResult> | null; | ||
} |
{ | ||
"name": "apollo-link-batch-http", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Batch HTTP transport layer for GraphQL", | ||
@@ -44,5 +44,5 @@ "author": "Evans Hauser <evanshauser@gmail.com>", | ||
"dependencies": { | ||
"apollo-fetch": "^0.6.0", | ||
"apollo-link": "^1.0.4", | ||
"apollo-link-batch": "^1.0.2", | ||
"apollo-fetch": "^0.7.0", | ||
"apollo-link": "^1.0.6", | ||
"apollo-link-batch": "^1.0.3", | ||
"graphql": "^0.11.0" | ||
@@ -63,7 +63,7 @@ }, | ||
"rimraf": "2.6.1", | ||
"rollup": "0.52.0", | ||
"ts-jest": "21.2.3", | ||
"rollup": "0.52.1", | ||
"ts-jest": "21.2.4", | ||
"tslint": "5.8.0", | ||
"typescript": "2.6.2", | ||
"uglify-js": "3.2.0" | ||
"uglify-js": "3.2.1" | ||
}, | ||
@@ -70,0 +70,0 @@ "jest": { |
@@ -7,2 +7,35 @@ import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link'; | ||
export namespace BatchHttpLink { | ||
/** | ||
* Note: This package will be updated to remove the dependency on apollo-fetch an use the same options / API as the http-link. | ||
*/ | ||
export interface Options { | ||
/** | ||
* The URI to use when fetching operations. | ||
* | ||
* Defaults to '/graphql'. | ||
*/ | ||
uri?: string; | ||
/** | ||
* The maximum number of operations to include in one fetch. | ||
* | ||
* Defaults to 10. | ||
*/ | ||
batchMax?: number; | ||
/** | ||
* The interval at which to batch, in milliseconds. | ||
* | ||
* Defaults to 10. | ||
*/ | ||
batchInterval?: number; | ||
/** | ||
* An instance of ApolloFetch to use when making requests. | ||
*/ | ||
fetch?: ApolloFetch; | ||
} | ||
} | ||
/** Transforms Operation for into HTTP results. | ||
@@ -18,8 +51,3 @@ * context can include the headers property, which will be passed to the fetch function | ||
constructor(fetchParams?: { | ||
uri?: string; | ||
batchInterval?: number; | ||
batchMax?: number; | ||
fetch?: ApolloFetch; | ||
}) { | ||
constructor(fetchParams?: BatchHttpLink.Options) { | ||
super(); | ||
@@ -26,0 +54,0 @@ |
Sorry, the diff of this file is not supported yet
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
25749
376
+ Addedapollo-fetch@0.7.0(transitive)
+ Addedcross-fetch@1.1.1(transitive)
+ Addedwhatwg-fetch@2.0.3(transitive)
- Removedapollo-fetch@0.6.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updatedapollo-fetch@^0.7.0
Updatedapollo-link@^1.0.6
Updatedapollo-link-batch@^1.0.3