GraphQL and Hibernate (ORM)

I have developed a spring web app using mysql as database and hibernate as the orm tool.

Then I came across GraphQL which apparently according to my googling, I found it is used to retrieve and persist data into database in a much simpler way [using an object structure].

My question: Is GraphQL an alternative to hibernate ?

And should I use GraphQL instead of hibernate (do I benefit from it?)?

Answers:

Answer

GraphQL is a query language where the client can choose from the meta model what to query and how the result should look.

Hibernate on the other hand is classical ORM.

These are totally different concepts.

It depends on your use case which to choose or you can also integrate both.

There is an example implementation on GitHub: https://github.com/graphql-java/graphql-java-examples/tree/master/hibernate-example

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.