GraphQL in Action (Manning)

Author: Samer Buna
Publisher: Manning
Pages: 384
ISBN: 978-1617295683
Print: 161729568X
Audience: Developers interested in GraphQL
Rating: 4.5
Reviewer: Kay Ewbank

GraphQL has achieved impressive popularity as an open-source language for APIs that can be used for querying and manipulating data.  This book provides a practical introduction to GraphQL and its use.

GraphQL was created by Facebook for internal use in delivering their mobile application data, but since being open sourced in 2015 has become increasingly widely used. Trying to understand just what it does and how to use it hasn't been that easy, and in this book Samer Buna sets out to answer those questions.

 

Banner

The book begins with a thorough explanation of GraphQL, beginning with a clear explanation of what it is and why you might want to use it. A chapter exploring the GraphAPIs, the GraphiQL editor, and the basics of the GraphQL language is followed by a chapter on customizing and organizing GraphQL operations.

graphql

Part Two of the book covers building GraphQL APIs, starting from designing a GraphQL schema. The chapter works through creating a real API from scratch, including writing queries to interrogate the schema and designing mutations - GraphQL data modification queries. Next, Buna goes on to implementing schema resolvers, showing how to build a schema using constructor objects using JavaScript objects instantiated from calls to constructor classes. This chapter also shows how to generate SDL (schema definition language) text from object-based schemas.

A chapter on working with database models and relations looks in depth at resolving fields from databases and transforming their names and values. This is followed by an examination of optimizing data fetching that covers caching and batching, the data loader and working with circular dependencies. This part of the book ends with a chapter on implementing mutations, GraphQL queries that modify data.

The final part of the book covers using GraphQL APIs, beginning with an extensive chapter on using GraphQL APIs without a client library. This chapter covers making Ajax requests, query requests and mutation requests as well as performing query requests scoped for a user.

The final chapter looks at using GraphQL APIs with the Apollo client. Apollo is the most popular client for GraphQL that supports multiple view libraries. The chapter covers using the Apollo client with JavaScript and with React, along with implementing and using GraphQL subscriptions. The Apollo platform is an implementation of GraphQL that transfers data between the cloud (the server) to the UI of your app. When you use Apollo Client, all of the logic for retrieving data, tracking, loading, and updating the UI is encapsulated by the useQuery hook

This book provides a clear, no-hype look at what GraphQL is and how to use it. The examples are clear and well explained, and the task of creating an API and using it used throughout the book works well and ought to be modifiable for real use.

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


The Big Book of Small Python Projects

Author: Al Sweigart
Publisher: No Starch Press
Date: June 2021
Pages: 432
ISBN: 978-1718501249
Print: 1718501242
Kindle: B08FH9FV7M
Audience: Novice Python developers
Rating: 4
Reviewer: Lucy Black
A project book? A good way to learn Python?



Accelerating Software Quality

Author: Eran Kinsbruner
Publisher: Perforce
Pages: 357
ISBN: 978-8671126044
Print: B08FKW8B9B
Kindle:B08FKWD2TR
Audience: Devops developers
Rating: 3
Reviewer: Kay Ewbank

With a subtitle of 'machine learning and artificial intelligence in the age of devops', this book certainly sounds as though it fits c [ ... ]


More Reviews

 

 

Last Updated ( Wednesday, 12 May 2021 )