Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
apollo-link-webextensions-messaging
Advanced tools
> Apollo link that, in a WebExtension, forwards GraphQL operations between processes
Readme
Apollo link that, in a WebExtension, forwards GraphQL operations between processes
npm i -S apollo-link-webextensions-messaging
reactive-graphql
and apollo-link-reactive-schema
Port
creation method: adaptable for cross-extension messaging or native messagingPort
(and esp. MessageSender
) in local GraphQL resolvers// ------------------
// in background page
import { createWebExtensionMessagingExecutorListener } from 'apollo-link-webextensions-messaging';
import { SchemaLink } from 'apollo-link-schema';
import schema from './path/to/your/schema';
// local schema execution
const link = new SchemaLink({
schema,
context: operation => ({
// `createWebExtensionMessagingExecutorListener` will
// add `port`, the `onConnect`'s `Port` as Operation's context
// we extract the `MessageSender` into GQL's context so that
// it can be used in resolvers
sender: operation.getContext().port.sender,
})
});
const listener = createWebExtensionMessagingExecutorListener({
link,
});
chrome.runtime.onConnect.addListener(listener);
// ----------------
// in content script
import { createWebExtensionsMessagingLink } from 'apollo-link-webextensions-messaging';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
const port = chrome.runtime.connect();
const client = new ApolloClient({
// can also be `createWebExtensionsMessagingLink((operation) => port)`
link: createWebExtensionsMessagingLink(port),
cache: new InMemoryCache(),
// from experience, if `queryDeduplication` is true,
// `client.watchQuery` unsubscription will not be
// properly passed down to the `link`
queryDeduplication: false,
});
client.query(MY_QUERY);
FAQs
> Apollo link that, in a WebExtension, forwards GraphQL operations between processes
The npm package apollo-link-webextensions-messaging receives a total of 8 weekly downloads. As such, apollo-link-webextensions-messaging popularity was classified as not popular.
We found that apollo-link-webextensions-messaging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.