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?)?
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?)?
Share Improve this question edited Jul 1, 2019 at 6:08 piet.t 11.9k21 gold badges44 silver badges55 bronze badges asked Jul 1, 2019 at 4:42 BHARATH CHANDRABHARATH CHANDRA 3491 gold badge4 silver badges13 bronze badges1 Answer
Reset to default 6GraphQL and Hibernate can be used together but are totally different concepts:
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.
It depends on your use case which to choose or you can also integrate both.
There is an example implementation on GitHub: https://github./graphql-java/graphql-java-examples/tree/master/hibernate-example