Over a million developers have joined DZone.

Authoring Interactive APIs Using Neo4j Swagger

DZone's Guide to

Authoring Interactive APIs Using Neo4j Swagger

· Java Zone
Free Resource

Just released, a free O’Reilly book on Reactive Microsystems: The Evolution of Microservices at Scale. Brought to you in partnership with Lightbend.

When developing web applications it becomes very useful to start by authoring an API over your data model in order to expose certain services to data-driven components of your front-end application.

For Neo4j, the best API authoring solution out there is Neo4j Swagger.

What does Neo4j Swagger do?

Neo4j Swagger is an API authoring solution that runs exclusively on top of a Neo4j graph database and was created by Mat Tyndal as an open-source project forked from Swagger.

Swagger is a Node.js open-source project that enables you to author interactive APIs on top of your data model.

What does the architecture look like?

Your front-end web app, which looks like this:


Makes HTTP REST requests to Neo4j Swagger, which looks like this:


Which then makes parameterized Cypher queries to a Neo4j database instance, which can be easily hosted in the cloud on either http://graphhost.com/ or http://www.graphenedb.com/

Neo4j then returnsresultstoSwagger, which then returnsresults back to your web app.

That's it. It's a super simple architecture and it's all open-source and ready for you to start programming with. You can clone my movie recommendation example app in the links above.

If you're interested in reviewing some slides from a recent talk I did about authoring this API and front-end application, head on over to SlideShare: http://www.slideshare.net/KennyBastani/building-killer-apps-with-neo4j-20

Strategies and techniques for building scalable and resilient microservices to refactor a monolithic application step-by-step, a free O'Reilly book. Brought to you in partnership with Lightbend.


Published at DZone with permission of Kenny Bastani, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}