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

apollo-suscriptions-server

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-suscriptions-server

This example application runs GraphQL subscriptions over a Neo4j database using the GraphQL Library for Neo4j on a [Apollo](https://www.apollographql.com/) server and [RabbitMQ](https://www.rabbitmq.com/) queue to provide production-ready scalability.

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Neo4j/GraphQL Subscriptions with Apollo and RabbitMQ

This example application runs GraphQL subscriptions over a Neo4j database using the GraphQL Library for Neo4j on a Apollo server and RabbitMQ queue to provide production-ready scalability.

To run this demo:

  1. Run npm install
  2. Make sure the variables NEO4J_URL, NEO4J_USER and NEO4J_PASSWORD in server.js are set to you Neo4j database.
  3. Make sure the variable AMQP_URI is set to a running RabbitMQ server (or any AMQP "0-9-1" server).
  4. Run npm start
  5. Go to localhost:4000/graphql

Some example queries can be found at examples.graphql

Running RabbitMQ

For testing purposes, RabbitMQ can be run with the provided docker-compose.yml file by executing:

docker-compose up rabbitmq

Note that you need both Docker and Docker-compose installed to run it this way.

Running without RabbitMQ

If you are building a local dev server, you can run this demo without RabbitMQ, by using a local event system. To do this replacing the plugin setup in server.js from:

const plugin = new Neo4jGraphQLSubscriptionsAMQPPlugin({
    connection: AMQP_URI,
});

To

const plugin = new new Neo4jGraphQLSubscriptionsSingleInstancePlugin()();

And update the neo4j/graphql import to:

const { Neo4jGraphQL, Neo4jGraphQLSubscriptionsSingleInstancePlugin } = require("@neo4j/graphql");

FAQs

Package last updated on 16 Dec 2022

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