Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
apollo-link-batch-http
Advanced tools
Note: This package will be updated to remove the dependency on apollo-fetch an use the same options / API as the http-link
An Apollo Link to allow batching of multiple operations into a single http request. Instead of sending a single operation, it sends an array of operations to the server.
npm install apollo-link-batch-http --save
import { BatchHttpLink } from "apollo-link-batch-http";
const link = new BatchHttpLink({ uri: "/graphql" });
Batch HTTP Link takes an object with four options on it to customize the behavior of the link. The possible keys on this configuration object are:
uri
: a string of the server or a default of "/graphql"batchMax
: a max number of items to batch, defaults at 10batchInterval
: the interval at which to batch (in ms), defaults to 10fetch
: an instance of ApolloFetchBy default, this link uses the Apollo Fetch library for the HTTP transport.
The Batch HTTP Link uses the headers
field on the context to allow passing headers to the HTTP request.
headers
: an object to be converted to headers for the http requestimport { BatchHttpLink } from "apollo-link-batch-http";
import ApolloClient from "apollo-client";
import InMemoryCache from "apollo-cache-inmemory";
const client = new ApolloClient({
link: new BatchHttpLink({ uri: "/graphql" }),
cache: new InMemoryCache()
});
// a query with apollo-client that will be batched
client.query({
query: MY_QUERY,
context: {
// example of setting the headers with context per operation
headers: {
authoriztion: Meteor.userId()
}
}
})
apollo-link-dedup 1.0.18
next
and/or error
calls might have already deleted the
key the new dedupe changes were intended to help with. <br/>
@JoviDeCroock in #988FAQs
Batch HTTP transport layer for GraphQL
The npm package apollo-link-batch-http receives a total of 10,965 weekly downloads. As such, apollo-link-batch-http popularity was classified as popular.
We found that apollo-link-batch-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.