Practical and example-driven, GraphQL in Action gives you the tools to get comfortable with the GraphQL language, build and optimize a data API service, and use it in a front-end client application. By working through set up, security, and error handling, you'll lean to create a complete GraphQL server. You'll also unlock easy ways to incorporate GraphQL into your existing codebase so you can offer simple, efficient, and scalable data APIs. Reduce bandwidth demands on your APIs by getting only the results you need--all in a single request! The GraphQL query language simplifies interactions with web servers, enabling smarter API queries that can hugely improve the efficiency of data requests. In GraphQL in Action , you'll learn how to bring those benefits to your own APIs, giving your clients the power to ask for exactly what they need from your server, no more, no less. GraphQL In Action teaches everything you need to get started with GraphQL--from design principles and syntax right through to performance optimization. When you're done, you'll have all the skills you need to get started writing and using scalable data APIs with GraphQL Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
The book reads like an overly long blog post/tutorial, the style is pretty similar to many Packt books. There is a strong feeling that there was a min threshold of pages the author had to hit. There are 350 pages mostly because there is a sheer amount of duplication, unnecessary screenshots (with the author's company logo everywhere), unrelated long code snippets, and basic tutorials on general software engineering topics. At the same time, the only language/library/client used demonstrated is JS/GraphQL.js/Apollo. So even things like custom scalars or Relay are missing.
The overview of the book mentions such topics as design principles, performance, and scalability. But the book has none of that, It doesn't even mention the "10 GraphQL Principles", has nothing about the Federation, and nothing about the ecosystem that allows you to scale GraphQL within an organization.
Overall the goal of the book seems to be to build a small starter project, which just happens to use basic GraphQL, instead of covering GraphQL. Along the road. Along the way, the author shares his understanding of / opinions on polyfills/React/Vue, git, different databases, SQL syntax, JS bundlers, Express (with a link to his $18 course).
Overall, this is a beginner-friendly book on GraphQL. It starts with the basics of GraphQL query syntax, then moves on to explaining schemas. The book uses the express-graphql library as the backend implementation to demonstrate how to write resolvers. In the later chapters, it covers how to send client requests using both basic "fetch" and the Apollo client. Aside from the fundamental concepts, it also addresses the "N + 1 queries problem", which is a nice addition.
The book essentially covers everything needed for getting started with GraphQL and gaining a general understanding of its concepts. The "in action" sections are explained in great detail, which might feel a bit slow-paced and repetitive to experienced developers, but it is quite suitable for beginners who need a thorough introduction.
In my opinion, this book is a great choice for absolute beginners who have no prior concept of GraphQL. However, for those who already have some experience with GraphQL or have done a basic "Get Started Implementation", it might not be very beneficial. Instead, diving into the Apollo documentation might offer more practical insights and be a better use of time.
The first thing I learned in “GraphQL in Action” is that GraphQL was released in 2015. I assumed it was older. While I've used GraphQL, I never learned it methodically.
The book assumes you know JavaScript and proceeds from there. Chapter 1 includes useful vocabulary like resolver functions. It also covers the benefits and problems. Also known as considerations.
I like that chapter 2 introduces GraphiQL and suggests downloading it. Definitely helps with learning. I also like that there were exercises to get comfortable with the tool. The book then proceeds with simple queries and more advanced one. For example, I learned how to sort the result set. The book also covers mutation and aliases. By the end of the book, the examples are quite advanced.
---
Disclosure: I received a free copy of this book from the publisher in exchange for writing this review.
Samer knows his stuff. GraphQL in Action is not only a complete introduction to GraphQL, but first and foremost a book full of tips and best practices for running GraphQL efficiently. In this book you will find everything you need to get started with GraphQL, from backend implementation to JS clients. Highly suggested reading for anyone wanting to dig deeper into what GraphQL has to offer.
For me, greater than half of the book was extremely useful and I learned a lot. The rest of the book focused on JavaScript, which I don't do (and yeah, I get it.) Then it moved to ApolloGraphQL again I get it, but I didn't notice that when I bought the book. Still worth the read, and again, I learned a lot of GraphQL that I didn't know when I started.