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

@neo4j/graphql-amqp-subscriptions-engine

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neo4j/graphql-amqp-subscriptions-engine

Subscriptions engine for `@neo4j/graphql`, supporting AMQP brokers such as RabbitMQ

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

@neo4j/graphql-amqp-subscriptions-engine

Subscription plugin for @neo4j/graphql, currently supporting AMQP 0-9-1 brokers such as:

  • RabbitMQ
  • Apache Qpid
  • Apache ActiveMQ

Documentation

Installation

npm install @neo4j/graphql-amqp-subscriptions-engine

Usage

const { Neo4jGraphQLAMQPSubscriptionsEngine } = require("@neo4j/graphql-amqp-subscriptions-engine");

const plugin = new Neo4jGraphQLAMQPSubscriptionsEngine({
    connection: {
        hostname: "localhost",
        username: "guest",
        password: "guest",
    },
});

const neoSchema = new Neo4jGraphQL({
    typeDefs,
    driver,
    plugins: {
        subscriptions: plugin,
    },
});

To close the connection with RabbitMQ:

await plugin.close();

Options

The following options are available in the plugin.

  • connection: AMQP connection options or amqp url (e.g. amqp://localhost).
  • exchange: (optional) Queue exchange, defaults to neo4j.graphql.subscriptions.fx.
  • reconnectTimeout: (optional) Timeout (in ms) between reconnection attempts. If not set, the plugin will not reconnect. Note that if the first connection fails, it will not attempt to reconnect.
  • log: (optional) Enable AMQP logs, defaults to true.
  • amqpVersion: (optional) AMQP version to use, only 0-9-1 supported at the moment.

Running tests

  • yarn test to run unit tests
  • yarn test:e2e to run integration tests. These tests require a RabbitMQ instance running, and are not run by default
    • Use docker-compose up rabbitmq to spin up a RabbitMQ container for testing
    • Use docker-compose up qpid to spin up a Qpid container for testing

Keywords

FAQs

Package last updated on 23 Feb 2024

Did you know?

Socket

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.

Install

Related posts

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