GraphQL

Articles about GraphQL on omid.dev — guides, topics, and notes from the field.

Migrating from REST to GraphQL: A Step-by-Step Guide for Express.js and Angular

Published: August 7, 2024 Reading time: 6 min

In today’s rapidly evolving web development landscape, GraphQL has emerged as a powerful alternative to traditional REST APIs. This blog post will guide you through the process of migrating your Express.js backend and Angular frontend from REST to GraphQL, unlocking the benefits of a more flexible and efficient API architecture. Full source Graphql Express Angular Migration A complete working example for this article — explore the full source on GitHub. View source 1. Introduction REST (Representational State Transfer) has been the go-to architectural style for building web APIs for many years. However, GraphQL, developed by Facebook, offers several advantages: ...

Continue Reading

Real-Time Data in Frontend Applications: WebSockets, SSE, and Beyond

Published: June 8, 2024 Reading time: 8 min

In today’s digital age, the demand for real-time data in frontend applications has surged dramatically. Users expect instantaneous updates, seamless interactions, and dynamic content without the need for manual refreshes. This blog post delves into various methods for handling real-time data in frontend applications, including WebSockets, Server-Sent Events (SSE), and emerging technologies such as HTTP/2 and HTTP/3 Push, WebTransport, GraphQL Subscriptions, and gRPC Streams. We’ll explore their implementation patterns, performance considerations, and relevant use cases. ...

Continue Reading

Advanced API Design: REST, GraphQL, and gRPC

Published: June 5, 2024 Reading time: 6 min

APIs are the cornerstone of modern applications, enabling seamless communication between services. The design of these APIs plays a crucial role in determining the efficiency, scalability, and overall performance of an application. Three of the most prominent approaches in API design are REST, GraphQL, and gRPC. Each approach has unique strengths and weaknesses, making them suitable for different use cases. In this post, we’ll dive deep into these advanced techniques, discuss best practices, performance considerations, and provide guidance on choosing the right protocol for your specific needs. ...

Continue Reading

Integrating GraphQL with Angular: A Practical Guide

Published: June 1, 2024 Reading time: 5 min

GraphQL is a powerful query language for APIs, providing a flexible and efficient alternative to REST. Combining it with Angular, a robust front-end framework, can lead to highly dynamic and responsive web applications. In this guide, we’ll explore how to integrate GraphQL with Angular, leveraging the Apollo Client for seamless data management. Live demoFull sourceAngular GraphQL with Angular & Apollo Angular CRUD via Apollo query and mutate — in-browser GraphQL mock for the live demo. Try the live demo View source 1. Introduction to GraphQL and Angular What is GraphQL? GraphQL is an open-source data query language developed by Facebook. It allows clients to request exactly the data they need, making APIs more flexible and efficient. ...

Continue Reading

Search