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

@graphql-yoga/subscription

Package Overview
Dependencies
Maintainers
2
Versions
1266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-yoga/subscription - npm Package Compare versions

Comparing version 0.0.1-beta.0 to 0.0.2-canary-2f869ad.0

createPubSub.spec.d.ts

32

index.js

@@ -16,11 +16,16 @@ 'use strict';

\`\`\`
// yarn install @ungap/event @ungap/event-target
import Event from '@ungap/event'
import EventTarget from '@ungap/event-target'
// yarn install --exact event-target-polyfill@0.0.3
import 'event-target-polyfill'
const pubSub = createPubSub()
\`\`\`
Alternatively, you can provide your own custom implementation.
\`\`\`
const pubSub = createPubSub({
event: {
event: {
Event,
EventTarget,
}
}
})

@@ -41,4 +46,9 @@ \`\`\`

publish(routingKey, ...args) {
const event = new Event(routingKey);
event.data = args[0];
var _a;
const payload = (_a = args[1]) !== null && _a !== void 0 ? _a : args[0];
const topic = args[1] === undefined
? routingKey
: `${routingKey}:${args[0]}`;
const event = new Event(topic);
event.data = payload;
target.dispatchEvent(event);

@@ -124,6 +134,6 @@ },

Object.defineProperty(exports, 'Repeater', {
enumerable: true,
get: function () {
return repeater.Repeater;
}
enumerable: true,
get: function () {
return repeater.Repeater;
}
});

@@ -130,0 +140,0 @@ exports.createPubSub = createPubSub;

{
"name": "@graphql-yoga/subscription",
"version": "0.0.1-beta.0",
"version": "0.0.2-canary-2f869ad.0",
"description": "",

@@ -5,0 +5,0 @@ "dependencies": {

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