Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
218 posts found
What Changed in gRPC and GraphQL: From .NET Core 3.0 to .NET 11 and Hot Chocolate 13 to 16
Backend PART 12

What Changed in gRPC and GraphQL: From .NET Core 3.0 to .NET 11 and Hot Chocolate 13 to 16

The first things to check in an old gRPC or GraphQL project are Grpc.Core usage and the Hot Chocolate major version: Grpc.Core has been in maintenance mode since 2021, and Hot Chocolate 16 rewrote the scalar API. We show what grpc-dotnet brought from .NET Core 3.0 to .NET 11 and Hot Chocolate from 13 to 16, the same ISBN scalar on both versions, and the September 2025 GraphQL specification, with real output.

14 Nov 2026 10 min 5
REST, gRPC or GraphQL? Deciding by Measuring the Same Bookstore Scenario in Three Styles
Backend PART 11

REST, gRPC or GraphQL? Deciding by Measuring the Same Bookstore Scenario in Three Styles

The client type and the screen's needs decide which API style to pick: in our measurements REST JSON spent the least server CPU on small service-to-service calls, gRPC halved the bytes on the wire, and on the book detail screen single-request GraphQL and gRPC-Web beat four-request REST. We measure the same Bookstore scenarios in three styles with k6 and discuss the decision dimensions and using them together.

14 Nov 2026 11 min 6
GraphQL from Angular: Apollo Angular, Code Generation, Subscriptions and @defer
Backend PART 10

GraphQL from Angular: Apollo Angular, Code Generation, Subscriptions and @defer

The solid way to connect Angular to GraphQL is Apollo Angular with a normalized cache, typed operations from GraphQL Code Generator, and the persisted operation manifest that same codegen produces. With Angular 22 and Apollo Client 4 we show signals and dataState, cache consistency after mutations, WebSocket subscriptions, the fetch-based link @defer needs, and the empty screen caused by a missing __typename in persisted documents, all with real output.

14 Nov 2026 13 min 5
Operating GraphQL Safely: Cost Analysis, Persisted Operations, Authorization and Schema Evolution
Backend PART 09

Operating GraphQL Safely: Cost Analysis, Persisted Operations, Authorization and Schema Evolution

To operate GraphQL safely in production you stop unknown queries with persisted operations and expensive ones with cost analysis and a depth limit, enforce authorization at field and resource level, and check schema changes with a diff in CI. With Hot Chocolate 16 we show how aliases and variable batching multiply cost, semantic introspection, error masking, @requiresOptIn and cache control failing to start under a Turkish region setting, all with real output.

14 Nov 2026 13 min 7
Performance in GraphQL: N+1, DataLoaders, Batch Resolvers and Cursor Pagination
Backend PART 08

Performance in GraphQL: N+1, DataLoaders, Batch Resolvers and Cursor Pagination

The fix for N+1 in GraphQL is a DataLoader that collects the resolvers' keys and loads them in one query; the authors of 50 books go from 51 SQL queries to 2. We show Hot Chocolate 16's DataLoaders, its batch resolvers and their hang in 16.7.5, the silent traps of combining them with projection, a cursor that is really an offset versus true keyset pagination, and OpenTelemetry spans, all with real output.

14 Nov 2026 14 min 8
Building the Bookstore GraphQL API with Hot Chocolate 16: Schema, EF Core Integration and Mutations
Backend PART 07

Building the Bookstore GraphQL API with Hot Chocolate 16: Schema, EF Core Integration and Mutations

The safe way to connect EF Core in Hot Chocolate 16 is to give every resolver its own DbContext from a pooled factory and to choose deliberately every field, filter and error the schema exposes. We show the random failures of a shared DbContext, the SQL behind projection and sorting, a purchase price leaking from the entity, typed errors with mutation conventions, and onError, all with real output.

14 Nov 2026 15 min 7
GraphQL Fundamentals: Schema, Queries, Mutations, Subscriptions and How Resolvers Work
Backend PART 06

GraphQL Fundamentals: Schema, Queries, Mutations, Subscriptions and How Resolvers Work

In GraphQL the client describes what a screen needs in one query and the server resolves each field with its own resolver; this ends over-fetching but brings N+1 and the loss of HTTP caching with it. With Hot Chocolate 16 we show the type system, variables, fragments and aliases, partial data and null propagation, @oneOf from the September 2025 spec and GraphQL over HTTP behaviour with real responses.

14 Nov 2026 13 min 7
gRPC from Browsers and REST Clients: gRPC-Web, JSON Transcoding and Angular
Backend PART 05

gRPC from Browsers and REST Clients: gRPC-Web, JSON Transcoding and Angular

Browsers can't speak gRPC directly because they can't reach trailers; with gRPC-Web you serve the same service to Angular through a typed client, and with JSON transcoding to clients expecting REST. We build a stock badge with Connect-ES and the resource API and show CORS, how int64 appears in JSON, the TypeRegistry trap with rich errors and the options now that Grpc.Swagger is deprecated, with real output.

14 Nov 2026 11 min 4
gRPC in Production: Interceptors, Authentication, Load Balancing, Retries and Health Checks
Backend PART 04

gRPC in Production: Interceptors, Authentication, Load Balancing, Retries and Health Checks

The biggest surprise when taking gRPC to production is load balancing: because HTTP/2 carries all calls over one connection, an L4 balancer or a Kubernetes ClusterIP piles traffic onto a single pod; the fix is client-side LB or an L7 proxy. We show interceptors, JWT and call credentials, retries multiplying across layers, health checks and reflection with real measurements.

14 Nov 2026 11 min 4
gRPC Streaming: Server, Client and Bidirectional Streaming with Backpressure
Backend PART 03

gRPC Streaming: Server, Client and Bidirectional Streaming with Backpressure

In gRPC streaming, HTTP/2 flow control brakes a slow consumer; with many subscribers you put a bounded Channel per subscriber in between, close the one that can't keep up, and let it resume from its last sequence number. With stock watching, bulk updates from a CSV file and barcode scanning at the till, we show all three streaming types, keepalive and resync with real output.

14 Nov 2026 14 min 4
Your First gRPC Service and Client in ASP.NET Core: Kestrel, Deadlines and RpcException
Backend PART 02

Your First gRPC Service and Client in ASP.NET Core: Kestrel, Deadlines and RpcException

Making gRPC calls safely means sharing the channel, putting a deadline on every call and carrying it down the chain with EnableCallContextPropagation; otherwise a downstream service finishes the work and reserves stock even after the client gave up. We bring Inventory up on Kestrel with h2c and show status codes, the rich error model and metadata with real logs.

14 Nov 2026 12 min 3
Designing Contracts with Protocol Buffers: .proto Files, Field Numbers and Backward Compatibility
Backend PART 01

Designing Contracts with Protocol Buffers: .proto Files, Field Numbers and Backward Compatibility

In gRPC the contract travels by field numbers, not field names, so adding a field is safe while changing a number or a type silently corrupts data. We write Bookstore Inventory's inventory.proto and show the enum zero rule, presence with optional, a DecimalValue for money, reserved, and C# generation with Grpc.Tools, all with real output.

14 Nov 2026 16 min 3
Blog Map