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

apollo-link-batch-http

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-batch-http - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

CHANGELOG.md
### 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

15

lib/batchHttpLink.d.ts
/// <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

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