Building a GraphQL server with Netflix DGS: An unfiltered review
In this article, the author discusses their experience building a GraphQL server using Netflix DGS in Java. They conclude that standing up a GraphQL server with Netflix DGS involves a heavy lift due to the need for cobbling together numerous frameworks, lots of boilerplate code, and ample context switching. The author also mentions that this is consistent with other schema-first, resolver-oriented approaches to GraphQL, which suffer from long development cycles, shallow APIs, and tight coupling to data models. The article then delves into the details of building a Netflix DGS GraphQL server, including getting Spring Boot, adding Netflix DGS, creating a GraphQL schema, implementing DataFetchers, defining Plain Old Java Objects (POJOs), accessing real data using Hibernate, and setting up fetching. The author also discusses the importance of writing test cases in tandem with implementation to iterate on the project rapidly and confidently until it builds and functions properly. The article concludes by questioning whether a full-featured GraphQL server can be built "in record time" using Netflix DGS, Spring Boot, an ORM, and other frameworks and libraries. The author suggests that there is a better way to build a full-featured GraphQL server: adopting a data-first compiler-oriented approach instead of the current conventional wisdom of schema-first resolver-oriented approach. They argue that this more sophisticated approach will be necessary as the volume, velocity, and variety of data continue to grow in enterprise settings.
Company
Hasura
Date published
March 1, 2024
Author(s)
David A. Ventimiglia
Word count
3461
Language
English
Hacker News points
None found.