最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - GraphQL and Hibernate (ORM) - Stack Overflow

programmeradmin2浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 6

GraphQL 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

发布评论

评论列表(0)

  1. 暂无评论