Skip to content

hemerajs/graphql-hemera

Repository files navigation

What is GraphQL?

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

preview

What is Hemera?

Hemera is a small wrapper around the official NATS driver. NATS is a simple, fast and reliable solution for the internal communication of a distributed system.

Introduction

This demo demonstrate how you can use Hemera for resolving your GraphQL queries. Because of the flexibility of GraphQL you have to deal with many resolvers Hemera can help you to manage this in a very simple and flexible way. Combine GraphQL with the power of pattern matching.

Here you can see a simple example to resolve a graphql query with Hemera. Hemera act as a api gateway to your services. If you want to extend the demo you have to follow some steps:

  1. Add a GraphQL primitive to the schema.
  2. Add a resolver bridge to your hemera service.
  3. Implement your Hemera service resolver.

This demo also provide a sample GraphQL subscription. Subscriptions allows to push messages to the client in realtime. Here you can find some GraphQL queries which can be executed in the playground.

Getting started

  1. Downloads NATS
  2. Start NATS ./gnatsd
  3. Start the application
npm install
npm start

GraphiQL Dashboard

http://localhost:3000/graphql

GraphQL endpoint

http://localhost:3000/graphql

About

Skeleton (or boilerplate) with Hemera & GraphQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published