Marcin
Marcin

Reputation: 422

Usage of GraphQL for Neo4j and Ontotext GraphDB simultaneously

I have two instances of two different database engines (Neo4j and Ontotext GraphDB) and I want to create common interface in GraphQL for these databases.

I want to use Java to create endpoint with GraphQL.

Should I use graphql-java library or do you recommend something else to merging usage of different database engines?

I looking for most flexible solution for this type of problem.

Upvotes: 2

Views: 478

Answers (1)

A1m
A1m

Reputation: 3117

GraphQL is designed to be a thin layer above your service layer. It is completely independent of the data storage you are using.

You ask to merge the access to your databases. This is actually a task for your service layer (which is simple java code. Could be backed by Spring for example). Your API layer will then consume your services. GraphQL can be your API layer or part of it.

You should consider either using REST or GraphQL. But having two different databases is not a deciding factor, as this is not the concern for either. You will be fine with both of them. Read this: GraphQL vs REST

If you decide to use GraphQL and Java. graphql-java is your only choice (and it is a good one).

Upvotes: 2

Related Questions