Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@absinthe/socket-apollo-link
Advanced tools
Absinthe Socket Apollo Link
$ npm install --save @absinthe/socket-apollo-link
$ yarn add @absinthe/socket-apollo-link
absinthe-socket-link.js
)// @flow
import * as AbsintheSocket from "@absinthe/socket";
import {createAbsintheSocketLink} from "@absinthe/socket-apollo-link";
import {Socket as PhoenixSocket} from "phoenix";
export default createAbsintheSocketLink(AbsintheSocket.create(
new PhoenixSocket("ws://localhost:4000/socket")
));
// @flow
import ApolloClient from "apollo-client";
import {InMemoryCache} from "apollo-cache-inmemory";
// see example 1
import absintheSocketLink from "./absinthe-socket-link";
const client = new ApolloClient({
link: absintheSocketLink,
cache: new InMemoryCache()
});
// @flow
import ApolloClient from "apollo-client";
import {createHttpLink} from "apollo-link-http";
import {hasSubscription} from "@jumpn/utils-graphql";
import {InMemoryCache} from "apollo-cache-inmemory";
import {split} from "apollo-link";
// see example 1
import absintheSocketLink from "./absinthe-socket-link";
const link = split(
operation => hasSubscription(operation.query),
absintheSocketLink,
createHttpLink({uri: "/graphql"})
);
const client = new ApolloClient({
link,
cache: new InMemoryCache()
});
Creates a terminating ApolloLink to request operations using given AbsintheSocket instance
absintheSocket
AbsintheSocketonError
$ElementType<Observer<Result, Variables>, "onError"
>onStart
$ElementType<Observer<Result, Variables>, "onStart"
>MIT :copyright: Jumpn Limited.
FAQs
Absinthe Socket Apollo Link
The npm package @absinthe/socket-apollo-link receives a total of 4,745 weekly downloads. As such, @absinthe/socket-apollo-link popularity was classified as popular.
We found that @absinthe/socket-apollo-link 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.