GraphQL on Kotlin: Building Modern APIs
300 pages
English
PDF
4.5

GraphQL on Kotlin: Building Modern APIs

GraphQL on Kotlin: Building Modern APIs

Author:

Year:

Summary:

The book "GraphQL on Kotlin" is a practical guide to creating modern, flexible, and efficient APIs using the Kotlin language. Unlike REST, GraphQL allows clients to request only the necessary data, minimizing the amount of transmitted information and simplifying interaction between the client and server.



The book is intended for developers familiar with the basics of Kotlin and web development. You will learn how to design schemas, write resolvers, handle errors, optimize queries, and integrate GraphQL with popular Kotlin frameworks such as Spring Boot and Ktor.



  • GraphQL Basics: types, queries, mutations, subscriptions.
  • Schema Design: creating a flexible and scalable data schema.
  • Integration with Spring Boot: setting up GraphQL in Spring applications.
  • Integration with Ktor: building lightweight APIs on Ktor.
  • Error Handling: proper handling and returning errors to the client.
  • Query Optimization: solving the N+1 problem, using DataLoader.
  • Security: authentication, authorization, limiting query depth.
  • Testing: unit and integration testing of GraphQL APIs.


The reader will learn to:

  • Create typed APIs with a clear data structure.
  • Efficiently handle complex queries with nested relationships.
  • Integrate GraphQL with databases (JPA, Exposed).
  • Implement real-time functionality using subscriptions.
  • Cover APIs with tests and ensure their reliability.


The book contains numerous code examples, practical tasks, and ready-made projects. You will be able to immediately apply the acquired knowledge in your projects, whether it's a microservice, a mobile application, or a web service. "GraphQL on Kotlin" is your guide to the world of modern APIs in one of the fastest-growing programming languages.

Recommendations